Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, December 2007
Window always on top


Message 1 in thread

Hi,

I have an application with several windows that come and go as various
states are entered.  The control of entry to states happens by inputs from
external hardware; I cannot stop the events occurring and must catch them
even if I don't let the user deal with them immediately.

I have one "emergency" window that must open full screen and stay on top of
all other windows regardless of whether new ones are opened or closed in
the background.

When the always on top window is active other processing is going on and
other windows may or may not open and close behind it.  The user should
(obviously) not see the other windows until the on top one goes away.

I am bound by external automated control of some parts of the system and I
cannot control when events from the external systems will come in.  I can
write the code to catch some events and hold off the opening of other
windows but that seems like a lot of work when a simple always on top flag
would do the trick.

Is there an easy, preferably portable, way in Qt(X11) to ask a window to
always be fullscreen and on top of other windows?  I'm just trying to prove
a concept at the moment so I can move forward with a software design to
meet customer requirements.  If I can't do what I need I'll need to rethink
the design to be much more complex.

Regards,
Adam

--
 [ signature omitted ] 

Message 2 in thread

Hello Adam,

use 	Dialog_or_Widget->setWindowFlags(Qt::WindowStaysOnTopHint | Qt::Tool);
This should do the trick.. It describes the window as always on top and 
as a "tool window". Call Assistant and then use index with 
setWindowFlags....

Regards,
Peter

Adam Hawes schrieb:
> Hi,
> 
> I have an application with several windows that come and go as various
> states are entered.  The control of entry to states happens by inputs from
> external hardware; I cannot stop the events occurring and must catch them
> even if I don't let the user deal with them immediately.
> 
> I have one "emergency" window that must open full screen and stay on top of
> all other windows regardless of whether new ones are opened or closed in
> the background.
> 
> When the always on top window is active other processing is going on and
> other windows may or may not open and close behind it.  The user should
> (obviously) not see the other windows until the on top one goes away.
> 
> I am bound by external automated control of some parts of the system and I
> cannot control when events from the external systems will come in.  I can
> write the code to catch some events and hold off the opening of other
> windows but that seems like a lot of work when a simple always on top flag
> would do the trick.
> 
> Is there an easy, preferably portable, way in Qt(X11) to ask a window to
> always be fullscreen and on top of other windows?  I'm just trying to prove
> a concept at the moment so I can move forward with a software design to
> meet customer requirements.  If I can't do what I need I'll need to rethink
> the design to be much more complex.
> 
> Regards,
> Adam
> 

--
 [ signature omitted ] 

Message 3 in thread

Hi Peter,

> use   Dialog_or_Widget->setWindowFlags(Qt::WindowStaysOnTopHint |
> Qt::Tool); This should do the trick.. It describes the window as always on
> top and as a "tool window". Call Assistant and then use index with
> setWindowFlags....

As is always the way the answer was right in front of me and I didn't see
it.  :)

Thanks,
Adam

--
 [ signature omitted ]