I have made a qss file of pyqt stylsheet and how am I supposed to call the file content and feed to self.setStylesheet(..)
?
from PyQt4 import QtCore
s = QtCore.QString('c:\myProject\darkFantasy.stylesheet')
The above code loads the path string rather than the actual stylesheet.
So how do I load the actual content of the stylesheet file? Should I read it using the open file in read mode?
QString
and better to close thefh
or usewith
. I've edited your post. – Jugulate