Results 1 to 3 of 3

Thread: Non client area painting with Qt

  1. #1
    Join Date
    Jan 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Non client area painting with Qt

    Dear Qt Developers/Experts

    My goal is to draw tabbar in titlebar (only in Windows) similar to firefox/chrome.
    I am using some DWM apis to achieve that as mentioned in http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
    Basically I make the entire area as nonclientarea and tabbar is drawn at the top automatically.

    I know these DWM apis only work with Windows Aero enabled, and I am fine with tabbar not shown in titlebar with DWM disabled.

    I am facing two issues.
    1. When the application is maximized, part of the left, top window portion gets clipped. See the attached image.
    2. If I enable 'Auto hide taskbar' property in Windows, I would expect the taskbar to popup when mouse is moved down near the taskbar with application maximized. That is not happening as well.

    I have attached a sample project that creates the issue.
    Can somebody help with this.
    Any suggestions are welcome.

    I can perfectly solve issue (1) with setContentsMargins() if I know the exact amount of pixels that are being clipped.

    Thanks
    Rajendran
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Non client area painting with Qt

    Dear All,

    I managed to fix aforementioned issues (at least in Qt4.8.5) and attaching working project.

    qdwmtest.zip

    Our project QuTTY also uses this technique to provide tabs in titlebar similar to Google Chrome.

    However, Qt5.1.0 has some issues with left, bottom sides of the mainwindow geometry getting reduced.

    Thanks
    Rajendran

  3. #3
    Join Date
    Feb 2014
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Non client area painting with Qt

    Hi Rajendran,

    It is a bit old, but I have a question. Is it possible to get this DWM API working without Aero enabled? The documentation says nothing about it.

    Thanks.

    Ivan RodrÃ*guez.

Similar Threads

  1. Replies: 6
    Last Post: 1st February 2012, 16:30
  2. Is window client area transparency possible?
    By jgver in forum Qt Programming
    Replies: 0
    Last Post: 1st March 2010, 20:03
  3. excluding an area from painting using clip path
    By berliner in forum Qt Programming
    Replies: 4
    Last Post: 15th May 2009, 02:30
  4. Replies: 19
    Last Post: 26th November 2008, 19:54
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.