After quite a lot of searching, I see nowhere how to change the colors of my Qt applications.
I already created a custom dark gtk theme in ~/.themes/
by modifying the default Ambiance, but now I need to also change Qt apps. And funnily, they already display in dark (sometimes too dark) so I may have changed it a long time ago (no idea how).
For example I use Scribus and Mendeleydesktop that use Qt (Qt5 and Qt4 respectively).
I tried:
to create a css style sheet with
background: blue; color: green;
as a test, but executing:mendeleydesktop -stylesheet myqtstyle.css
does not affect anything (just complains:
Could not parse application stylesheet
)qt4-config
, no effect.I searched in
gconf-editor
anddconf-editor
if there are settings for Qt, no luck.I modified the gtk-3.20, gtk-3.0 and gtk-2 files of my theme, no effect.
Does someone have a simple solution for customizing my Qt apps?
It is possible to set a style sheet when launching a Qt application (as you have detailed in the question):
This should work, however it is possible that the developer of the application is forcing a particular style within the application code so it will not always work.
The reason you are receiving the error message
Could not parse application stylesheet
is because the test style sheet you have produced is not a valid Qt style sheet.The Qt documentation provides information on creating your own style sheets and links to these are below:
Given that you have received an error message relating to parsing, I would assume that it will work if you provide the path to a valid style sheet as a command line argument.
You may find it difficult creating a style sheet if you are not familiar with the standard Qt widget class names. Further information on these can be found here.