I'm using Qt 4.3.3 on Xcode. I need to know a way to prevent a parent widget to keep on showing & focusing itself, when a child widget is closed.
Example:
I have one QWidget, and 2 QDialog as a child of QWidget.
In some cases a user could open one of the QDialog (let's call it dialogOne), and when dialogOne is showed, a user open dialogTwo.
Based on what I have been coded, the last shown dialog takes top position (the window is activated). But when I close the top dialog (either dialogOne or dialogTwo), the focus is moved to the main QWidget (the parent).
Now, what I want to do is to make a focus behaviour based on least recently focused widget / dialog. So for example:
If the order of widget is (bottom to top in Z-axis): parentWidget->dialogOne->dialogTwo.
When I close dialogTwo, the order is:
parentWidget->dialogOne.
If the order of widget is (bottom to top in Z-axis): parentWidget->dialogTwo->dialogOne.
When I close dialogTwo, the order is:
parentWidget->dialogTwo.
Is there anyone that could help me on this issue ?
Bookmarks