Key_events get added up on showing Application Modal QDialog



  • Hi Folks,

    I am using a Animated Gif file using QMovie, QLabel and QDialog, to show transition from one screen to another ( in case if the transition takes more time to switch over from one screen to another ).

    I am using setModal( true ) and open() methods of QDialog to show this Animation gif, so that user cant interact during this process of transition from one screen to another....

    In case if i use these methods to enable "ApplicationModal", in some other screen, where we are handling "key_Right" and "key_Left", these keyevents get multiplied/added up depends upon the number of times this Animated Gif is shown through this QMovie, QLabel, QDialog .... Key_Right fires twice ( on single key_right press ) in case if i show the Animated Gif once... and it fires thrice, in case if we show the Animated Gif again... and so on ....

    we are actually using done( int r ) method and Qt::WA_DeleteOnClose to delete this Animated Gif using QDialog....

    is it a bug or do we need to set some WindowsFlags for the QDialog?



  • difficult to say with this description is this possible for you to share some code spinet?



  • When you construct the QDialog, what is the parent you give to it? If you want to be it application modal it is recommended to set it 0.



  • [quote author="VCsala" date="1293125846"]When you construct the QDialog, what is the parent you give to it? If you want to be it application modal it is recommended to set it 0.[/quote]

    For being ApplicationModal, I am not passing any parent pointer to that Dialog...



  • Please, show some code snippets to allow us understand better your problem.


Log in to reply