Preventing user interaction with a widget
-
I think the problem I reported in Key press (arrow keys) cause loss of focus may be because when the selected row of the table view changes to a row that refers to an image that is not currently loaded I am disabling the table view and starting a long running operation to load the image. On completion I re-enable the table view and call setFocus().
This doesn't seem to cause a big problem if the dock widget which hosts the table view is docked (not clear why), but if it is undocked, then attempting to restore the focus to the table view doesn't restore the selected item ...
If there a way to block user input to a widget (in this case the table view) without actually disabling the control?
-
Hi,
You can use an event filter however it might be surprising to your users that nothing happens when they try to interact with your widgets.
Another solution might be to have a modal dialogue that states there's something going on.