   Qt main loop
  I have been working with Qt for a couple days now. I'm used to Windows and using WinMain, where you wait for events, if no events happen, the main window loop will process.How do I set up a main window loop in Qt? Lets say I simply have a window/QMainWindow that shows and then the application.exec() happens. Say I want the main window to have a timer and continuously update the time in ms since the startup of the application. (This should not be event based off of a timer event, it should always be called.)   
  You don't, application.exec() starts Qt's own mainloop.You probably want to use QTimer.   ;Quote:Original post by dpadam450Say I want the main window to have a timer and continuously update the time in ms since the startup of the application. (This should not be event based off of a timer event, it should always be called.)If you really insist on not using timer events for timer events, you could use the QCoreApplication::setEventFilter() function to set your own event filter that gets called for every single event the QApplication handles.  Perhaps that will let you avoid using Qt and write WIN32 apps instead.