I haven't found a way to cut the long code lines on these parts. No matter from what point I cut the line to the next, it breaks the string. Is there a way to cut these in to shorter lines somehow?
self.setStyleSheet('ApplicationWindow { background-color: rgba(10, 10, 10, 10); } ButtonDefault { background-color: rgb(255, 10, 10); color: rgb(255, 255, 255); }')
My own solution was to move stylesheets in to seperate .css file and pare the whole thing from there as a simple string. It's nicer to develop that way too, but does this method sound reasonable?
stylesheet_string = ''
# Opens external stylesheet file
with open('stylesheet.css', 'r') as stylesheet:
for line in stylesheet:
line.replace('\n', ' ')
line.replace('\t', ' ')
stylesheet_string = stylesheet_string+line
self.setStyleSheet(stylesheet_string)