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



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



  • 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!



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



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



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



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



  • [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?



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


Log in to reply
 

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