Results 1 to 15 of 15

Thread: MainWindow disappearing when loading a QMessageBox

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    Quote Originally Posted by fabietto View Post
    the exit button I'm using has got some particular characteristics?
    Yes, it might be connected to some slot that closes the window.

  2. #2
    Join Date
    Jun 2007
    Location
    Plymouth, UK
    Posts
    36
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    Quote Originally Posted by jacek View Post
    Yes, it might be connected to some slot that closes the window.
    It is! I was missing a line in the .h file generated via Qt Designer/UIC, which was implementing exactly what you said. I removed that line and now everything works smoothly. and as expected.

    Thank you very much to all of you!

    Cheers,
    Fabio

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    Quote Originally Posted by fabietto View Post
    It is! I was missing a line in the .h file generated via Qt Designer/UIC, which was implementing exactly what you said. I removed that line and now everything works smoothly. and as expected.
    Don't remove any lines from autogenerated code or the problem will come back. Better fix the .ui file.

  4. #4
    Join Date
    Jun 2007
    Location
    Plymouth, UK
    Posts
    36
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    Quote Originally Posted by jacek View Post
    Don't remove any lines from autogenerated code or the problem will come back. Better fix the .ui file.
    Sure, Jacek. I've used the Qt Designer only at the beginning in order to create the skeleton of the main windows. Now I don't generate the .h file automatically, but I simply use a progressively modified version of it.

    Cheers,
    Fabio

  5. #5
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    That's an interesting way to use Designer..

  6. #6
    Join Date
    Jun 2007
    Location
    Plymouth, UK
    Posts
    36
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MainWindow disappearing when loading a QMessageBox

    Quote Originally Posted by pherthyl View Post
    That's an interesting way to use Designer..
    Probably not the most intelligent, I know... but it's so handy...

Similar Threads

  1. mainwindow disappearing
    By locus in forum Qt Programming
    Replies: 1
    Last Post: 28th January 2007, 09:24

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.