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 4123736
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:38:59+00:00 2026-05-20T23:38:59+00:00

Hello all I have main windows application and I like to popup dialog for

  • 0

Hello all
I have main windows application and I like to popup dialog for settings when the application (the qMainWindow)
Is fully loaded ? I tried to just in the main window constructor:

SettingsDialog settingsDialog;
settingsDialog.exec();

but when I start my application I see the QDialog and the main window minimized in the background
what I need that my main windows will be in the background but not minimized and the QDialog in the middle blocking the main
windows until ok button is preset

  • 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-20T23:39:00+00:00Added an answer on May 20, 2026 at 11:39 pm

    Use QTimer::singleShot with zero time interval it will call specified slot from the event loop when constructor and show() have been completed. Here is an example:

    #include <QtCore/QTimer>
    #include <QtGui/QApplication>
    #include <QtGui/QDialog>
    #include <QtGui/QMainWindow>
    
    class MW : public QMainWindow
    {
      Q_OBJECT
    public:
      MW();
    private slots:
      void showDialog();
    };
    
    MW::MW()
    {
      QTimer::singleShot(0, this, SLOT(showDialog()));
    }
    
    void MW::showDialog()
    {
      QDialog d;
      d.setWindowTitle("dialog");
      d.exec();
    }
    
    int main(int argc, char* argv[])
    {
      QApplication app(argc, argv);
      MW mw;
      mw.show();
      app.exec();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello all I have a small dialog which I created dynamically, which has a
hello all this seems to be my problem I have a table in mysql
hello all i am working on a project in which i have a webpage
Problem Hello all! I have this code which takes my jpg image loops through
Hello I currently have this code checking if a cookie exists, it works all
Hello guys, I have a general design problem with iPhone application. I want to
Hello All at StackOverflow, over the last few days I have had some problems
Hello All! I'm active in a fairly large project, but I have limited experience
Update the question Hello All, I would like improve my email address validation code.
This is really starting to piss me off. I feel like I have tried

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.