I have a PyQt StyleSheet scheme in a separate document that I want to import into a UI.
I'm doing the following:
style_sheet_file = qc.QFile(os.path.join(os.path.dirname(__file__), 'stylesheets', 'scheme.qss'))
style_sheet_file.open(qc.QFile.ReadOnly)
self.setStyleSheet(qc.QLatin1String(style_sheet_file.readAll()))
However, I receive the following error in PySide:
AttributeError: 'module' object has no attribute 'QLatin1String'
What other alternatives could you use to do such an action?
I tried:
#style_sheet_file = mc.internalVar(usd=1) + 'digital_tutors\stylesheets\scheme.py'
#self.setStyleSheet(style_sheet_file)
and it runs me without error, but I do not care about the file inside the UI. That is, it is as if setSyleSheet
was empty.