You are not logged in.

#1 2015-03-22 14:50:16

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

[SOLVED] Setting Qt icon theme without KDE.

Where can I set the icon theme for QT[5] without using KDE? Is there some manual [deskop agnostic] way. E.g. Trolltech.conf, but ,if yes, what is the key?
The wiki states that "There is no way of setting the icon theme from QtConfig, but since Qt follows the Freedesktop.org Icon Specification, any theme set for X is picked up by Qt."
But how can I set the theme set for X?

Last edited by manuelschneid3r (2015-03-24 18:40:11)


Please feel free to correct my english.

Offline

#2 2015-03-22 15:01:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Setting Qt icon theme without KDE.

Offline

#3 2015-03-22 15:37:33

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

Well I dont want to set the theme. I want to set the icon theme. In the link you provided there is the key for the style=gtk+, which works fine for the widgets and borders, but the icons are still hicolor.


Please feel free to correct my english.

Offline

#4 2015-03-22 15:59:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Setting Qt icon theme without KDE.

Can you post your ~/.config/Trolltech.conf?

Offline

#5 2015-03-22 16:07:11

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

[Qt%20Plugin%20Cache%204.8.false]
usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqgif.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqico.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqjpeg.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqmng.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqsvg.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\imageformats\libqtiff.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\iconengines\libqsvgicon.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\sqldrivers\libqsqlibase.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\sqldrivers\libqsqlite.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\sqldrivers\libqsqlmysql.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\sqldrivers\libqsqlodbc.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17
usr\lib\qt4\plugins\sqldrivers\libqsqlpsql.so=40806, 0, x86_64 linux g++-4 full-config, 2014-12-14T18:44:17

[Qt%20Factory%20Cache%204.8]
com.trolltech.Qt.QInputContextFactoryInterface%3A\usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=2014-12-14T18:44:17, imsw-multi
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqgif.so=2014-12-14T18:44:17, gif
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqico.so=2014-12-14T18:44:17, ico
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqjpeg.so=2014-12-14T18:44:17, jpeg, jpg
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqmng.so=2014-12-14T18:44:17, mng
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqsvg.so=2014-12-14T18:44:17, svg, svgz
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqtiff.so=2014-12-14T18:44:17, tiff, tif
com.trolltech.Qt.QIconEngineFactoryInterfaceV2%3A\usr\lib\qt4\plugins\iconengines\libqsvgicon.so=2014-12-14T18:44:17, svg, svgz, svg.gz
com.trolltech.Qt.QIconEngineFactoryInterface%3A\usr\lib\qt4\plugins\iconengines\libqsvgicon.so=2014-12-14T18:44:17
com.trolltech.Qt.QSqlDriverFactoryInterface%3A\usr\lib\qt4\plugins\sqldrivers\libqsqlite.so=2014-12-14T18:44:17, QSQLITE
com.trolltech.Qt.QSqlDriverFactoryInterface%3A\usr\lib\qt4\plugins\sqldrivers\libqsqlmysql.so=2014-12-14T18:44:17, QMYSQL3, QMYSQL

[Qt]
font="Ubuntu,9,-1,5,50,0,0,0,0,0"
Palette\active=#555555, #dedede, #ffffff, #cbc7c4, #b9b9b9, #b8b5b2, #333333, #ffffff, #555555, #f9f9f9, #dedede, #ababab, #d64937, #f9f9f9, #0000ff, #ff00ff, #e9e9e9, #000000, #ffffdc, #dedede
Palette\inactive=#555555, #dedede, #ffffff, #cbc7c4, #b9b9b9, #b8b5b2, #333333, #ffffff, #555555, #f9f9f9, #dedede, #ababab, #d64937, #f9f9f9, #0000ff, #ff00ff, #e9e9e9, #000000, #ffffdc, #dedede
Palette\disabled=#999999, #dedede, #ffffff, #cbc7c4, #b9b9b9, #b8b5b2, #999999, #ffffff, #999999, #f9f9f9, #dedede, #ababab, #d6d6d6, #f9f9f9, #0000ff, #ff00ff, #e9e9e9, #000000, #ffffdc, #dedede
fontPath=@Invalid()
embedFonts=true
style=GTK+
doubleClickInterval=400
cursorFlashTime=1000
wheelScrollLines=3
resolveSymlinks=false
globalStrut\width=0
globalStrut\height=0
useRtlExtensions=false
XIMInputStyle=On The Spot
DefaultInputMethod=xim
audiosink=Auto
videomode=Auto
GUIEffects=none

Please feel free to correct my english.

Offline

#6 2015-03-22 22:34:05

The Infinity
Member
Registered: 2014-07-05
Posts: 91
Website

Re: [SOLVED] Setting Qt icon theme without KDE.

I think you are talking about Qt 5 applications only?

Qt 4 applications seem to detect the icon theme from the KDE configuration files properly for me. When using Qt 5 applications I have the same problem as you (when using Openbox instead of Plasma 5/GNOME/Cinnamon). I already posted a workaround: https://bbs.archlinux.org/viewtopic.php … 1#p1501631
It has the drawback that tray icons will no longer work.

@karol: Do you think it is possible to enforce an icon theme in the Trolltech.conf file? As far as I know this is not possible and the file is not used by Qt 5 applications at all (at least not to configure the visual appearance). Correct me if I'm wrong.

Last edited by The Infinity (2015-03-22 22:35:11)

Offline

#7 2015-03-22 22:49:05

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

Did not test Qt4, so I cant say. One thing is still different from your case: Currently I'm programming a Qt5 app and QIcon::themeName reports the IconTheme to be Numix, which is correct. The lookup logic was wrong in 5.3 and was fixed... Well lets say changed in 5.4, but in fact it is even worse now. (Bug42239). The hell I reported this bug half a year ago. Maybe this is the cause of this theme stuff. Just a guess. I know it is not welcome but maybe if you have spare time, you could check the minimal reproducing example and show the developers that this bug is _not_ just somewhat important.

Last edited by manuelschneid3r (2015-03-22 22:56:32)


Please feel free to correct my english.

Offline

#8 2015-03-22 23:10:39

The Infinity
Member
Registered: 2014-07-05
Posts: 91
Website

Re: [SOLVED] Setting Qt icon theme without KDE.

Then it is different from my case. I am describing that Qt is not even able to detect the name of the icon theme which seems to work for you. However in my case Qt is able to show the icon theme properly if it knows its name.

The lookup logic was wrong in 5.3 and was fixed...

Qt 5.4 did not fix the problem for me (using Openbox).

What happens if you use QIcon::setThemeName() just to ensure that Qt has definitely the right icon theme name? Enforcing a specific icon theme that way works for me with Openbox and GNOME/Cinnamon, but oddly enough not with Plasma 5. I also tested Numix that way which I had coincidentally still installed (numix-icon-theme-git package from AUR) and it works. I can not reproduce your issue.

What desktop environment/window manager are you using?
Have you already tried to use any other theme then Numix? Works Numix with Qt 4 or other GUI frameworks? (Just to ensure that the problem is not caused by your Numix installation.)

Last edited by The Infinity (2015-03-22 23:23:03)

Offline

#9 2015-03-22 23:29:09

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

Using Cinnamon 2.4. Funnny but this seems to be definitively related to the mentioned bug. I found an app which tells that it does the magic. But as you can see the app itself can just find the icons that I can apply successfully from the cinnamon settings too. In the minimal reproducing example I set the names of the themes explicitely, but nothing changed. I dont know if I have a Qt4[Edit] app, can you tell me an example?

sPWrEyx.png

Last edited by manuelschneid3r (2015-03-23 07:46:44)


Please feel free to correct my english.

Offline

#10 2015-03-23 00:03:58

The Infinity
Member
Registered: 2014-07-05
Posts: 91
Website

Re: [SOLVED] Setting Qt icon theme without KDE.

Where can one find your minimum reproducing example? Are you sure that XDG_CURRENT_DESKTOP is set to GNOME (use printenv | grep XDG_CURRENT_DESKTOP=)?

The configuration tool you're using seems interesting. I'll check it out tomorrow.

I dont know if I have a Qt app

I'm programming a Qt5 app

Maybe you should get some sleep as well :-)

Offline

#11 2015-03-23 00:11:07

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

Sorry big_smile what I wanted to say is that I dont know any qt4 apps. I just tries some randoms in the archlinux/applist wiki, but it is hard to find an app that is using standard icons. The filedialog is a qt internal and seems to work anyways  (check qtcreator). The example I am talking about is uploaded in the bug I mentioned before (QtBug 42239)

printenv | grep XDG_CURRENT_DESKTOP=
XDG_CURRENT_DESKTOP=X-Cinnamon

Currently I am trying to find any differences between Numix and Faenza. What I found out is, that those who do not work do organize their icons according "size/category" faenza does "category/size"


Please feel free to correct my english.

Offline

#12 2015-03-23 15:40:56

The Infinity
Member
Registered: 2014-07-05
Posts: 91
Website

Re: [SOLVED] Setting Qt icon theme without KDE.

The setting "XDG_CURRENT_DESKTOP=X-Cinnamon" seems to work as well. (Some time/versions ago Qt 5 did not show icons under Cinnamon which could be fixed by setting XDG_CURRENT_DESKTOP to GNOME. That's why I was asking for the value of that variable).

What I found out is, that those who do not work do organize their icons according "size/category" faenza does "category/size"

And both icon themes are working with Qt 4/GTK apps?

Your reproducing example works for me with XDG_CURRENT_DESKTOP=X-Cinnamon. I'm using the Numix theme from AUR (which does not cover applications icons so I used "normal" icons for the test like list-add, document-save, ...).

Qt 4 apps using standard icons: Dolphin, Okular, ... (all KDE applications which are not ported to Qt 5 yet)

Last edited by The Infinity (2015-03-23 15:42:43)

Offline

#13 2015-03-24 18:39:55

manuelschneid3r
Member
From: Germany
Registered: 2013-04-14
Posts: 152

Re: [SOLVED] Setting Qt icon theme without KDE.

Okay the real problem is the missing qt5-svg module, which silently produces this problem. See here. Now I dont need to set it anymore, since it uses the GTK icon theme.

Last edited by manuelschneid3r (2015-03-25 12:11:31)


Please feel free to correct my english.

Offline

Board footer

Powered by FluxBB