My first foray into Qt land using python and pyqt. I've created a toggle button and I'm able to set its unchecked colors:
self.DCButton.setStyleSheet("color: black; background-color: red;")
self.DCButton.setStyleSheet("color: black; background-color: red;")
To copy to clipboard, switch view to plain text mode
My problem is setting the button color when its "checked":
self.
DCButton.
setStyleSheet(QPushButton#DCButton:checked {"color:black; background-color: green;}")
self.DCButton.setStyleSheet(QPushButton#DCButton:checked {"color:black; background-color: green;}")
To copy to clipboard, switch view to plain text mode
doesn't work. I'm sure this is a simple syntax problem.
TIA
Bookmarks