swarnika
11th April 2013, 06:49
I have a class named BaseDialog which inherits QFrame. All other dialogs inherits BaseDialog. These dialogs contain 3 QGroupBox which inturn contains QLineEdit and QPushButton.
I used the flag Qt::WindowStaysOnTopHint so that my dialog always remain on top irrespective of the focus.
This flag didn't work on my system(RHEL 6). So I used the flag Qt::X11BypassWindowManagerHint.
Above issue was resolved but dialog stopped taking any keyboard input.
So whenever I enabled my dialog for the first time, i manually activated the dialog using activatewindow().
As soon as I click outside the dialog, it is deactivated. I reimplemented FocusInEvent(). It is working fine if I click at top. But if I click at QGoupBox or QLineEdit inside that dialog, it is not activated.
Please tell me is there any way that this problem can be solved without using activateWindow() with each QLineEdit?(As there as many QLineEdits in every dialog :()
I used the flag Qt::WindowStaysOnTopHint so that my dialog always remain on top irrespective of the focus.
This flag didn't work on my system(RHEL 6). So I used the flag Qt::X11BypassWindowManagerHint.
Above issue was resolved but dialog stopped taking any keyboard input.
So whenever I enabled my dialog for the first time, i manually activated the dialog using activatewindow().
As soon as I click outside the dialog, it is deactivated. I reimplemented FocusInEvent(). It is working fine if I click at top. But if I click at QGoupBox or QLineEdit inside that dialog, it is not activated.
Please tell me is there any way that this problem can be solved without using activateWindow() with each QLineEdit?(As there as many QLineEdits in every dialog :()