PDA

View Full Version : Force a QDialog to be the top-level Window and to stay at this level ?



Nyphel
4th June 2007, 11:43
Hello,

I set my QDialog to be the top-level Window, using activateWindow().
My problem is that if the user clic on another Window (of an another application), the new Window is set to the top-level and mine is no more visible... :crying:

I would like to know if it is possible to block my QDialog at the top-level, and prevent it from being "hiden" by another Window ?
In fact, this would be like the QTextBox widget : the window stays at top-level and the user can't clic on other windows if he hasn't close the QTextBox.

My QDialog is used to give informations to my user, and is very small : it's like a bubble just above the system tray. I want it to be visible all the time. I've tried to use signals/slots to set it at top-level each time an other Window is set in front of mine, but I didn't find any helpfull signal.

Thanks for your ideas :)

jpn
4th June 2007, 11:46
See

QWidget::setWindowFlags()
Qt::WindowStaysOnTopHint (http://doc.trolltech.com/4.2/qt.html#WindowType-enum)

Nyphel
4th June 2007, 11:47
3 minutes to answer... :eek:
Are you a bot ? :D

Thanks JPN :)

jpn
4th June 2007, 12:04
3 minutes to answer... :eek:
Are you a bot ? :D

Thanks JPN :)
Heh, I just happened to refresh at the moment. No problem. ;)

Nyphel
4th June 2007, 12:07
Waou thanks a lot, that's exactly what I was searching for since 1 hour !
And there a more possibilities than what I expected...