PDA

View Full Version : Block for interactions



mpi
30th October 2009, 08:24
I have a widget with a push button. When the push button is pressed the cursor changes to a WaitCursor (hour-glass shaped cursor). In the same instant, I want all user-interaction with the widget to be blocked. That is, the widget should change to the same state it has when eg. being blocked by a modal dialog.

Is this just calling setEnabled(False) or is there some more specific method? A blocked widget looks different from a disabled widget.

Best regards,

Mads

wysota
30th October 2009, 09:32
It's just calling setEnabled(false). With a modal dialog the situation is different, input events are simply not being processed. If you want the exact same behaviour (which would seem unnatural to the user), apply an event filter on all the widgets in the window and steal their input events.