Results 1 to 2 of 2

Thread: mainwindow disappearing

  1. #1
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default mainwindow disappearing

    Quick question:

    Can a main window widget be invoked from pressing a button on a dialog?

    i would like to do this, but when i try, the mainwindow, appears and then disappears.

    Qt Code:
    1. void to_begin::on_okButton_clicked(){
    2. MainWindow w;
    3. w.show();
    4. }
    To copy to clipboard, switch view to plain text mode 

    to_begin is a class that inherits the dialog as well as QDialog, and the dialog form on which ok_Button is located.

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

    Default Re: mainwindow disappearing

    Look into the FAQ.

  3. The following user says thank you to wysota for this useful post:

    locus (29th January 2007)

Similar Threads

  1. How do I use a mainwindow .ui file?
    By thomaspu in forum Qt Tools
    Replies: 2
    Last Post: 23rd November 2006, 06:32
  2. Replies: 3
    Last Post: 23rd July 2006, 18:02
  3. MainWindow update during computations
    By Gizmho in forum Qt Programming
    Replies: 7
    Last Post: 13th July 2006, 20:10
  4. Paint MainWindow Regions
    By pedros09 in forum Qt Programming
    Replies: 1
    Last Post: 5th May 2006, 09:43
  5. mainwindow does not refresh
    By edb in forum Qt Programming
    Replies: 22
    Last Post: 25th January 2006, 16:42

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.