[RESOLVED] StyleSheet file... it's possible?
-
By the way: note that your (broadpeak) method has a potential danger. You implicitly cast a QByteArray to a QString: QFile::readAll() returns a QByteArray, while setStyleSheet takes a QString. That means that you assume that the .css file will be ASCII (see the docs for QString). That might or might not be a valid assumption... I prefer to use a [[doc:QTextStream]] to read a text file instead.
-
[quote author="Andre" date="1347371510"]...that you assume that the .css file will be ASCII ... That might or might not be a valid assumption... I prefer to use a [[doc:QTextStream]] to read a text file instead.
[/quote]Yes, of course, you are right (as usual :))!
But I always use simple ASCII editor for css editing, because I never have special character in my qss file.