Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to change the icon size?



  • Hey, I added a Icon to my app using

        import sys
        app = QtWidgets.QApplication(sys.argv)
        MainWindow = QtWidgets.QMainWindow()
        ui = Ui_MainWindow()
        ui.setupUi(MainWindow)
        MainWindow.setWindowTitle("Hue Control")
        MainWindow.setWindowIcon(QtGui.QIcon('icon.png'))
        MainWindow.show()
        sys.exit(app.exec_())
    

    but its way to small...
    Is there a way to change the size of it?

    Thanks!



  • In this post you will find a small method to change an icon’s size (and colour, meant for unicolour svg icons).



  • I don't know a way to change the size of the windows icon. Isn't this size prescribed by the window system/operating system? Do other programs have larger icons?


Log in to reply