Results 1 to 3 of 3

Thread: QToolButton icon not updated in overflow menu

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QToolButton icon not updated in overflow menu

    I have a QToolBar with several QToolButtons that change state (and icon) when clicked. This works just fine when the toolbar is visible. However, when the window is shrunk such that the toolbar becomes an "overflow" menu (accessible via the chevron icon >>), the icons do not get updated in the menu. E.g.,

    Qt Code:
    1. if (state_ == Qt::Checked || state_ == Qt::PartiallyChecked) {
    2. state_ = Qt::Unchecked;
    3. }
    4. else {
    5. state_ = Qt::Checked;
    6. }
    7. QAction *a = defaultAction();
    8. if (a) {
    9. a->setIcon(icon_[state_]);
    10. }
    To copy to clipboard, switch view to plain text mode 
    Note that the icon does get updated eventually, when the toolbar becomes visible again.

    Is this a known bug in Qt4.2?
    Last edited by jacek; 25th September 2007 at 23:57. Reason: changed [html] to [code]

  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: QToolButton icon not updated in overflow menu

    You can check that with the task-tracker.

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QToolButton icon not updated in overflow menu

    I posted it to Trolltech as #180626, but I also found it as resolved in Qt 4.3 under bug #118546.

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.