Results 1 to 3 of 3

Thread: QMainWindow

  1. #1
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default QMainWindow

    I create a widget which inherit QMainWindow,if I
    Qt Code:
    1. show()
    To copy to clipboard, switch view to plain text mode 
    it,the program will break down,but if I add
    Qt Code:
    1. QMessageBox::warning()
    To copy to clipboard, switch view to plain text mode 
    before
    Qt Code:
    1. show(),
    To copy to clipboard, switch view to plain text mode 
    the program will run norally.
    Why?

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMainWindow

    what do you mean by break down? it crashes? or it simply terminates?.. for the later case see if you have QApplicaion::exe() called at the end of main...

    can you produce a minimal compilable program reproducing the problem?

  3. #3
    Join Date
    Mar 2009
    Location
    Gansu,China
    Posts
    188
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMainWindow

    It is solved,thk u.

Similar Threads

  1. QMainWindow with QMainWindow
    By baray98 in forum Qt Programming
    Replies: 3
    Last Post: 12th April 2011, 07:07
  2. QMainWindow modal from non-qt window?
    By hickscorp in forum Qt Programming
    Replies: 3
    Last Post: 21st November 2008, 09:10
  3. QMainWindow setCentralWidget from ui widget, Qt4
    By alan in forum Qt Programming
    Replies: 5
    Last Post: 13th May 2008, 13:00
  4. QMainWindow child of a QDialog
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2008, 07:16
  5. Replies: 18
    Last Post: 22nd February 2006, 20:51

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.