It did? The same code you posted above after fixing it? I didn't think it should have, but maybe Qt queued up all those events until the event loop was running, and then started executing them. That does make sense, actually - the myWidget.show() call occurs before the loop is running, so the event that it triggers must just sit there in the queue waiting until it can be processed. Learned something here.It did however run as written and printed correctly.




Reply With Quote

Bookmarks