Check cursor State
i am setting cursor state by QApplication::setOverrideCursor( Qt::WaitCursor );
but i have to check whether the cursor is in normal form of not and then i have to call
how can i check?
if ( ? )
QApplication takes care of that for you. It keeps an internal stack. All you need to do, is make sure that your number of setOverrideCursor calls matches the number of your restoreOverrideCursor calls.
from the docs:
Application cursors are stored on an internal stack. setOverrideCursor() pushes the cursor onto the stack, and restoreOverrideCursor() pops the active cursor off the stack. changeOverrideCursor() changes the curently active application override cursor.
Every setOverrideCursor() must eventually be followed by a corresponding restoreOverrideCursor(), otherwise the stack will never be emptied.
We have project called OrderXpress
in our project we use two plugins photoXpress and AlbumXpress
we load these plugins through container and setting cursor to wait state but in plugins
it internally setting cursor for differnt modes so how can i identify the cursor state to restore it in plugins as our plugins did not have the knowledge of our container.