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. Linux: Setting the default icon theme (System-wide) Help!
QtWS25 Last Chance

Linux: Setting the default icon theme (System-wide) Help!

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 6.4k 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.
  • T Offline
    T Offline
    TRayT
    wrote on last edited by
    #1

    Two steps forward, one step back.

    How do I set a default icon theme, so that all Qt applications on my system use it? I've looked at multiple solutions, but it doesn't actually look like Qt has any utilities for easily setting a global theme and [separate] icon theme for non-KDE Qt applications.

    I'm at my wits end here, any help would be greatly appreciated.

    EDiT: I'm aware that some Qt apps will use their own icons, regardless. I'm mostly talking about that use QIcon::fromTheme.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adnan
      wrote on last edited by
      #2

      If you want QT to use default icon theme, then instead of using icons from resource file, use the following method:
      @QIcon dir_icon= ui->treeWidget->style()->standardIcon(QStyle::SP_DirIcon);@

      This is just an example, i hope it will get you through!

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TRayT
        wrote on last edited by
        #3

        I'm not talking about in application development. I'm using a Desktop Enviroment that use straigt Qt without KDE. How do I configure Qt, as installed on my system, to inform and enforce the usage of a specific icon set.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adnan
          wrote on last edited by
          #4

          What you are asking is not clear. Is it that you are running a QT application say(QBittorent) and Desktop Environment say Gnome3 and you want it use specific icon set.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TRayT
            wrote on last edited by
            #5

            That's exactly what I'm asking. I'm using Razor-Qt, and I'm essentially asking how I configure my Qt installation to inform Qt applications of what icon set to use. I personally like the faenza icon set, but I'm at a loss as to how I configure Qt to force all my applications to use it.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              adnan
              wrote on last edited by
              #6

              As far as I know, it depends on the application itself. If the developer has used his own icons from resource file then you can't replace those icons by merely changing the icon set of your system theme. The applications which use this sort of syntax:
              @QIcon dir_icon= ui->treeWidget->style()->standardIcon(QStyle::SP_DirIcon);@
              can only use the system theme icons.
              Besides, what do you mean by configuring QT application. Are you installing it from a tar ball.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TRayT
                wrote on last edited by
                #7

                [quote author="adnan" date="1331533242"]The applications which use this sort of syntax:
                @QIcon dir_icon= ui->treeWidget->style()->standardIcon(QStyle::SP_DirIcon);@
                can only use the system theme icons.
                [/quote]

                So how does the application know what the system them icons are? How do I inform the application of my default icon set?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  adnan
                  wrote on last edited by
                  #8

                  You cannot inform your application about your default icon set. The application should be self conscious and it gets aware of system icon set if it uses above syntax. So if application is not using default icon set, it means there is no way by which it can use default icon set since the above syntax hasn't been used in that case.

                  1 Reply Last reply
                  0

                  • Login

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