QIcon set default size

  • Hey guys,

    after setting the iconsize via "setIconSize(QSize(screenY/30, screenY/30));", I would like to set it back to default.

    Any idea how to?

    Thanks in advance!

  • Hi,

    you can store the old values and restore them later

    class MyWindow: public MainWindow
        QSize _originalSize;
    void MyWindow::changeIconSize() 
        _originalSize = iconSize();
    void MyWindow::restoreSize()

Log in to reply

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