Results 1 to 5 of 5

Thread: QMainWindow appears without border and title bar on Linux when "Desktop Effects" used

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy QMainWindow appears without border and title bar on Linux when "Desktop Effects" used

    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.
    Last edited by will49; 20th August 2008 at 21:59.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMainWindow appears without border and title bar on Linux when "Desktop Effects"

    Quote Originally Posted by will49 View Post
    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...

  3. #3
    Join Date
    Nov 2006
    Location
    Dresden, Germany
    Posts
    108
    Thanks
    9
    Thanked 12 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMainWindow appears without border and title bar on Linux when "Desktop Effects"

    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.
    Andreas

  4. #4
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMainWindow appears without border and title bar on Linux when "Desktop Effects"

    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 Code:
    1. Qt::WindowFlags flags=windowFlags();
    2. flags^=Qt::WindowMaximizeButtonHint;
    3. setWindowFlags(flags);
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Sep 2008
    Location
    New York
    Posts
    90
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMainWindow appears without border and title bar on Linux when "Desktop Effects"

    Quote Originally Posted by ghorwin View Post
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.