PDA

View Full Version : Qt::QueuedConnection difference on platforms?



n9yty
1st November 2010, 20:17
This is in regard to a thread I had posted over on the Newbie forum:

http://www.qtcentre.org/threads/35520-QMenu-aboutToHide()-and-triggered()-signals?p=164118&highlight=#post164118

But the essence of the problem in the ScanTailor application is that it works fine on Windows but not on the Mac... It has to do with the order the app receives and processes the aboutToHide and triggered signals from a QMenu.

The author states that he is connecting the aboutToHide() signal to a slot using Qt::QueuedConnection type, which he says "delays the signal until after the other ones" or something to that effect. But on the Mac this seems to have no effect, as aboutToHide still arrives before triggered.

What is the difference between Qt::QueuedConnection and Qt::DirectConnection in a case where there is no threading? Does Qt::QueuedConnection do anything with regard to "delaying" signals??

I am unsure why there is a difference between the platforms as to the timing of these two QMenu signals on the Mac and Windows. The notes on Qt::QueuedConnection simple seem to indicate a difference as to if the slot is called immediately or left to be called when the event loop of the receiver is next run. Must be that the Mac event loop runs again before the triggered() signal fires, whereas on Windows it does not.

Am I missing something else, something more obvious? :)