Results 1 to 3 of 3

Thread: Workaround for a Qt ui bug

  1. #1
    Join Date
    May 2009
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Workaround for a Qt ui bug

    I'm trying to use a button that has both an icon and a menu assigned. The problem is that I'm running against this old bug: http://bugreports.qt.nokia.com/browse/QTBUG-3624

    On Windows XP, the left margin is about twice as large as the right one and the text is clipped by the menu arrow.

    Any idea on how I can fix this? The bug is still present in Qt 4.6.2...

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Workaround for a Qt ui bug

    I don't know if this is applicable for you, but you can leave the default stretch factor. Just comment out addStretch(1) calls and notice that the behaviour changes. Though you still need to be careful with the width of the widget.
    Last edited by lyuts; 6th July 2010 at 07:12. Reason: spelling corrections
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    May 2009
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Workaround for a Qt ui bug

    Thanks, I'll try that. For now I set the menu arrow width and height to 0 through styles, and then set the caption to "<caption>..." to indicate that it will open a menu.

    Not as nice as using the arrow, but seems workable.

Similar Threads

  1. Replies: 0
    Last Post: 19th April 2010, 16:29
  2. Workaround for StandardItemModel drag drop bug
    By onamatic in forum Qt Programming
    Replies: 4
    Last Post: 9th November 2008, 21:50
  3. QWidget::setMask: bug &/or help for workaround
    By ataffard in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2008, 07:34
  4. Replies: 13
    Last Post: 1st October 2006, 17:02

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.