Results 1 to 3 of 3

Thread: Problem with event handling of multiple windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,320
    Thanks
    316
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem with event handling of multiple windows

    Do you think I am doing it right?
    No. The application owns the Qt event loop so if it isn't started (by QApplication::exec()) then nothing happens.

  2. #2
    Join Date
    Feb 2014
    Posts
    26
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem with event handling of multiple windows

    Thanks. I replaced my code from w->exec() to w->show() and to a.exec() but still the main window was not updated until I closed my Qdialog.
    The solution was that I created a new thread in my program and in this thread I generated my Qdialog. This way I was able to refresh the main window while my QDialog was up. Another problem I was facing in this setup. Every time I closed a message box in QDialog, the QDialog was closed also. This was solved when I went back and replaced w->exec() to w->show() and removed a.exec(). I am not sure why.

Similar Threads

  1. about multiple windows design problem
    By kenchan in forum Qt Programming
    Replies: 2
    Last Post: 16th November 2012, 04:44
  2. Replies: 1
    Last Post: 14th June 2011, 03:46
  3. Subclassed qlistwidget event handling problem
    By Annihilator in forum Qt Programming
    Replies: 9
    Last Post: 13th February 2010, 18:55
  4. event handling...
    By xyzt in forum Qt Programming
    Replies: 1
    Last Post: 25th March 2008, 07:16
  5. Event handling problem
    By Mel Seyle in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2007, 04:15

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.