View Full Version : How to use QAbstractEventDispatcher to replace QCoreApplication::loopLevel?

4th April 2011, 10:18
In my application I use QCoreApplication::loopLevel.
Since this method is part of the Qt3-support-layer, I want to get rid of it.

Documentation says that I should use the QAbstractEventDispatcher instead, but I have absolutely no clue on how to write a function using the QAbstractEventDispatcher that would give me the same return value as QCoreApplication::loopLevel.

Where do I start?

4th April 2011, 10:42
I don't believe this can be done easily. It's best to avoid the need to use this function. What do you need it for?

4th April 2011, 11:19
If I could use the functionality of QCoreApplication::loopLevel, it would solve my question at http://www.qtcentre.org/threads/40259-Handling-specific-events-only-in-the-main-loop. Since my other question contained a quite complex explanation, I thought it would help to ask a much simpler question (like how to replace QCoreApplication::loopLevel).

4th April 2011, 11:23
I would still approach the problem from the other end - I think that counting loops is just a bad design.