Results 1 to 8 of 8

Thread: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

    In this code I can only see one window that has a chance of being visible - pMainWin. Which is the other one?

  2. #2
    Join Date
    Jan 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Angry Re: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

    the main window:
    Qt Code:
    1. class MainWindow : public QMainWindow
    2. {
    3. Q_OBJECT
    4. ....
    To copy to clipboard, switch view to plain text mode 

    and in the main.cpp the login method of mainwinow is called which creates the
    login dialog (QDialog) :

    Qt Code:
    1. bool
    2. MainWindow::login(const QString &DefaultPilot, bool bInitialLogin)
    3. {
    4. Flightbook::centerInDesktop(*this);
    5.  
    6. if(m_pLoginDialog)
    7. {
    8. delete m_pLoginDialog;
    9. }
    10.  
    11. m_pLoginDialog = new LoginDialog(DefaultPilot);
    12. .....
    To copy to clipboard, switch view to plain text mode 

    So the login dialog always appears. Only the MainWindow isn't shown on virgin machins (with no Qt installed).....
    After login winow finishes first time the MainWindow comes up...

    nando

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

    Do you use exec() or show() to show the login dialog?

  4. #4
    Join Date
    Jan 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

    Hi,

    i use exec

    nando

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: 4.4.3 Windows - Missing MainWindow when starting Application on other machine

    In that case you are probably suffering from QApplicaton::quitOnLastWindowClosed. Set it to false and see if it makes a difference.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.