tags:

views:

140

answers:

3

Hi,

I have a problem with Qt modeless dialog in Solaris 8/10 machine using CDE (Common Desktop Environment).

The dialog serve as drawing panel/popup that required user to choose the tools from main application before proceeding to draw on it. The problem is whenever user click on main application toolbar, then the dialog will goes behind the main application.

Notice that this is the behavior pertaining to CDE only, Open Windows enviroment or Solaris Java environment don't cause this issue.

My question is how can I make it always on top of its parent (main application)? I've tried to pass in WX11BypassWM flag to the dialog, to by pass window manager, but then the border and frame is gone which cause the dialog to not drag/move-able.

Any solution to fix this?

Many thanks :) ~jky~

A: 

Hey,

I'm not sure I understood your question, but, wouldn't it be possible to use :

Found in QtAssistant :

enum Qt::WindowType flags Qt::WindowFlags

Qt::WindowStaysOnTopHint : "Informs the window system that the window should stay on top of all other windows."

I hope it helps a bit !

Andy M
Thanks Andy, I've tried Qt::WStyle_StaysOnTop, but it doesn't work. I tried also to combine "WX11BypassWM | WStyle_StaysOnTop | WStyle_Title" (and other combination of WStyle_DialogBorder, WType_TopLevel...), it only stays on top if WX11BypassWM is pass in. But whenever WX11BypassWM is pass in, the dialog shown up will not have border nor the tittle bar.Which means it's a unmove-able tittle-less dialog...
JackyTeoh
Ops, the comment is not formated..
JackyTeoh
A: 

Thanks Andy,

I've tried Qt::WStyle_StaysOnTop, but it doesn't work. I tried also to combine "WX11BypassWM | WStyle_StaysOnTop | WStyle_Title" (and other combination of WStyle_DialogBorder, WType_TopLevel...), it only stays on top if WX11BypassWM is pass in.

But whenever WX11BypassWM is pass in, the dialog shown up will not have border nor the tittle bar.

Which means it's a unmove-able tittle-less dialog...

JackyTeoh
-1 This is not an answer to the question. It should have been a comment to the answer you were replying to.
Mark Byers
A: 

Since I can't find a solution for this issue, for the time being, I resolve it by resizing and reposition the main application and the modeless dialog to be side by side.

This at least will let user navigate in both interface.

Anyone if have better suggestion, pls update. Thx ;)

JackyTeoh