PDA

View Full Version : QMainWindow appears without border and title bar on Linux when "Desktop Effects" used



will49
20th August 2008, 18:48
My Qt 4.3.5 app appears without the main window's border and title bar when "Desktop Effects" (not related to Qt) are enabled in Linux Suse 10. The main window is a QMainWindow and appears fine on Windows, Mac OS and Suse when effects are disabled.

Anyone come across this before (sorry search isn't working on here)

Kinda weird.

wysota
21st August 2008, 07:47
My Qt 4.3.5 app appears without the main window's border and title bar when "Desktop Effects" (not related to Qt) are enabled in Linux Suse 10. The main window is a QMainWindow and appears fine on Windows, Mac OS and Suse when effects are disabled.
So maybe the problem is with these desktop effects? Qt doesn't control window decorations, it's the window manager's job.


(sorry search isn't working on here)

Hmm... What do you mean it doesn't work? Seems to work fine for me...

ghorwin
19th February 2009, 16:03
Problem appeared again with Ubuntu 8.10. Some Qt and KDE applications have no window decorations (minimize/maximize) buttons. For example, konsole only works in fullscreen mode and overlays everything else.

Any suggestions which Compiz setting may be causing this?

System: Ubuntu 8.10, Compiz window manager, all current updates.

will49
19th February 2009, 16:42
My problem was caused because I wasn't setting the window flags correctly (didn't add to the current flags when I wanted to set a particular flag).

My corrected code is:



Qt::WindowFlags flags=windowFlags();
flags^=Qt::WindowMaximizeButtonHint;
setWindowFlags(flags);

Sheng
19th February 2009, 16:56
Problem appeared again with Ubuntu 8.10. Some Qt and KDE applications have no window decorations (minimize/maximize) buttons. For example, konsole only works in fullscreen mode and overlays everything else.

Any suggestions which Compiz setting may be causing this?

System: Ubuntu 8.10, Compiz window manager, all current updates.

I come across same thing under debian. But it does not bother me, actually I like it. just put a group box which is a little bit smaller than your window, or plot your own borders.