Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QToolButton and QMainWindow::setIconSize()
QtWS25 Last Chance

QToolButton and QMainWindow::setIconSize()

Scheduled Pinned Locked Moved General and Desktop
qtoolbarqtoolbuttonqdockwidgetqmainwindow
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ravas
    wrote on 5 Oct 2015, 18:21 last edited by
    #1

    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?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Oct 2015, 23:43 last edited by
      #2

      Hi,

      When are you calling these functions ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply 6 Oct 2015, 00:58
      0
      • S SGaist
        5 Oct 2015, 23:43

        Hi,

        When are you calling these functions ?

        R Offline
        R Offline
        ravas
        wrote on 6 Oct 2015, 00:58 last edited by ravas 10 Jun 2015, 00:58
        #3

        @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.

        1 Reply Last reply
        0

        3/3

        6 Oct 2015, 00:58

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved