Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7652357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:44:50+00:00 2026-05-31T11:44:50+00:00

I created a popup window like this: QFileInfo FileA = AAA; QFileInfo FileB =

  • 0

I created a popup window like this:

QFileInfo FileA = "AAA";  
QFileInfo FileB = "BBB";   

if (fileA.exists() == false & (fileB.exists() == false))
      {
          QFrame* PopupWin = new QFrame(this, Qt::Popup | Qt::Window  );
          PopupWin->setGeometry(450,450, 400, 200);
          PopupWin->setLineWidth ( 3 );
          PopupWin->setMidLineWidth ( 1 );
          PopupWin->setFrameStyle ( QFrame::Box | QFrame::Raised);
          QLabel *message = new QLabel(PopupWin);
          message->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
          message->setGeometry(100,50, 200, 100);
          message->setText("blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                             "bluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu"
                             "bliiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"
                             "bleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
                             "bloooooooooooooooooooooooooooooooooooooooooooooo");
          PopupProzess->show();

      }

I have three questions:

  • When the window pops up I can’t see the whole text, just a part of
    the first line of the label. How can I show the whole text?
  • The frame is closed when clicking
    anywhere at the screen. How do disable this “anywhere-click-close”
    and create a pushbutton or a kind of cross that closes the
    frame/window?
  • How do I fit the text right into the label and the label right
    into the frame?

I searched in the Qt Doc and also googled, but did not find the solutions. greetings

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:44:51+00:00Added an answer on May 31, 2026 at 11:44 am

    Why are you creating a QFrame? What you want is a QDialog.

    • Use the QtDesigner in order to design your dialog
    • Implement a class inheriting from QDialog corresponding to the dialog you designed
    • Use exec in order to show it modally.

    This way your code will be cleaner and much easier to read.

    QDialog* pMyDialog = new MyDialog(this); // you have to delete it later...
    if (fileA.exists() == false && (fileB.exists() == false))
    {
           pMyDialog->exec(); 
    }
    

    Also there is no reason to hardcode the geometry of a UI element. This is what QtDesigner is for.

    Concerning the label, as spbots already answered you have to set the wordWrap property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im developing an web app. Here I created a popup-window in JavaScript. Now I
I would like to create popup window with jquery UI dialog, a parameter recordtype
I have created a dialog popup on click to show - I would like
I need to create a popup window in AS3, which can contain things like
I want to create a Qt popup window which will behave like a message
I created a widget that serves as some kind of popup window und hence
I am trying to create a popup window for android honeycomb like google docs
I would like to try out different animation styles for a popup window using
I would like to create a javascript modal pop up window to get some
How can I create a Popup balloon like you would see from Windows Messenger

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.