QToolButton and QMainWindow::setIconSize()



  • Using Windows 7 and Qt 5.5
    QMainWindow::setIconSize() will only update a QToolButton on a QToolBar to around 32x32 px.
    However, if I restart the program, then the icons will be the desired size.

    QMainWindow::setIconSize() doesn't seem to affect a QToolButton in a QDockWidget.
    QToolButton::setIconSize() works...
    but it would be nice if everything was updated via QMainWindow::setIconSize(), without needing a restart.

    Am I missing anything?


  • Lifetime Qt Champion

    Hi,

    When are you calling these functions ?



  • @SGaist The icon size is saved via QSettings in a QDialog called from a QMainWindow subclass. After the dialog is closed, QMainWindow::setIconSize() is called.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.