I’d like to write a QDialog lookalike class. I’ve managed to filter out mouse events to non-dialog widgets pretty well, but I still have a problem with focus. As the QDialog lookalike class is just a usual widget it can lose focus by way of key presses (tabs). Hence widgets not related to the QDialog lookalive, that I cannot click, but are focus-able, may get the focus. Is there a neat way to prevent the user from focusing away from my dialog lookalike’s child widgets?
I’d like to write a QDialog lookalike class. I’ve managed to filter out mouse
Share
Here is a solution:
Assuming the child is an instance of
QFrameorQWidget.