Creating and working with external style sheets
Sorry for probably such a trivial question.But how do I create a .qss (stylesheet ) file?I have seen several examples in the web which all use qss files.Can't I use just .css file? Also how do I apply a style via code from these files?
Qt style sheet doesn't support all what CSS proposes, that's one of the reason why qss is used. It gives you a hint of what is in.
Anyway, you could also name it .txt it would be the same.
To apply the style just read the qss file using QFile and then setStyleSheet with the content of the file.
Hope it helps
Thanks!Got it :)
You're welcome !
If all is clear for you please update the thread title prepending [solved] so other forum users may know a solution has been found :)