Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to change the icon size?
Qt 6.11 is out! See what's new in the release blog

How to change the icon size?

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 1.8k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    KaffeMitMilf
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • AxelViennaA Offline
      AxelViennaA Offline
      AxelVienna
      wrote on last edited by
      #2

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

      C++ and Python walk into a bar. C++ reuses the first glass.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SimonSchroeder
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        1

        • Login

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