| 17 | |
| 18 | |
| 19 | class StyleWindow(QWidget): |
| 20 | |
| 21 | def __init__(self, *args, **kwargs): |
| 22 | super(StyleWindow, self).__init__(*args, **kwargs) |
| 23 | layout = QVBoxLayout(self) |
| 24 | self.editStyle = QPlainTextEdit(self) |
| 25 | layout.addWidget(self.editStyle) |
| 26 | layout.addWidget(QPushButton('Apply', self, clicked=self.onApply)) |
| 27 | self.editStyle.setPlainText(QApplication.instance().styleSheet()) |
| 28 | |
| 29 | def onApply(self): |
| 30 | QApplication.instance().setStyleSheet(self.editStyle.toPlainText()) |
| 31 | |
| 32 | |
| 33 | if __name__ == '__main__': |
no outgoing calls
no test coverage detected