How to Block the Mouse Press Events During Wait Cursor?



  • I have few QPushButtons. If I click on a QPushButton, another window with large number of GUI components (like line edit, text edit, push buttons, labels etc) will pop up. But due to large number of GUI components used in the window, the window takes some time to load. At that time, I use a Wait Cursor till the window gets loaded completely. During the Wait Cursor is loading, if I Click on a another QPushButton, the app gets crashed.

    How to block these clicking of other QPushButtons during the Wait cursor is loading. I want to block the Mouse Press events during the Wait cursor is On.



  • How are you deciding that all the windows are loaded successfully ? If you know this precisely, you can use grab and ungrab mouse. Or you can put the eventfilter and ignore all mouse events till load is complete.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.