PDA

View Full Version : Window without a exit button



jbpvr
12th March 2007, 19:49
This is probably a simple question, but does anyone know how to change a dialog widget so that it doesn't have a x button on the window title bar. I want the ability to have the window title bar, without any buttons on it.

Thanks,

Kumosan
12th March 2007, 20:14
Unfortunately this is not an easy question. It depends on the window manager you use. Usually you manipulate your window decorations with the Qt::WindowFlags. However, some window manager seem to ignore certain settings.

jbpvr
12th March 2007, 20:18
redhat 9 and cent os using gnome

Kumosan
12th March 2007, 20:39
Don't know Gnome, so I cannot say much about it. But I suppose it is similar to KDE in this regard. Those full desktop environments usually have their own ideas how to decorate windows. If you think about it, it is logical. Gnome and KDE are not simple window managers, but a complete system with a consistent look and feel. Now suppose every program is able to implement its own idea how a window looks like an behaves.

As I said, I don't know Gnome, so I might be totally wrong here, but it might be impossible to remove the X with Qt methods. However, you can block the close event.

wysota
12th March 2007, 23:54
Or you could just use a set of windowflags that make sure "Qt::WindowSystemMenuHint" is not set.