Results 1 to 3 of 3

Thread: QTabWidget setCornerWidget adds some small white margins (OS X)

  1. #1
    Join Date
    Aug 2015
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QTabWidget setCornerWidget adds some small white margins (OS X)

    Hello everyone. I've stumbled on a small but very unpleasant bug in the QTabWidget->setCornerWidget method. If I'm trying to add any widget (except QToolButton) into the top right corner, this adds a small white gap right on top of my widget. I'm trying to add my own QToolButton with slightly changed paintEvent (to get rid of the QToolButton whityish button). Can you simply push me into the right direction how to remove this white gap?
    BTW it seems that the top left corner works just as I expect, unfortunately this isn't an option.
    [qoobar-scr.jpg

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTabWidget setCornerWidget adds some small white margins (OS X)

    Does this happen with every widget, e.g. when you use a QLabel?
    Have you tried with a different widget style to see if the current one might be interfering?

    Cheers,
    _

  3. #3
    Join Date
    Aug 2015
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTabWidget setCornerWidget adds some small white margins (OS X)

    Yes, indeed, this happens with other widgets as well - QLabel, QPushButton. I think the trick here is how QToolButton (native one) paints itself beside QTabBar, but I didn't manage to understand how it's achieved in the Qt src.
    BTW, Qt 5.5.0, OS X Mavericks

Similar Threads

  1. Replies: 1
    Last Post: 7th January 2015, 04:19
  2. [ANN] ODB C++ ORM adds support for Qt
    By borisk in forum Qt Programming
    Replies: 0
    Last Post: 28th April 2011, 12:08
  3. QTabWidget->setCornerWidget() unexpected resize.
    By hickscorp in forum Qt Programming
    Replies: 7
    Last Post: 20th December 2006, 14:12
  4. What's the use of setCornerWidget
    By postbeerliu in forum Qt Programming
    Replies: 1
    Last Post: 4th September 2006, 06:01
  5. QTabWidget::setCornerWidget()
    By michael in forum Qt Programming
    Replies: 3
    Last Post: 8th June 2006, 21:13

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.