Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Pushbutton style sheet not working as expected.
Darcy last edited by Darcy
I completed my UI in designer, and converted it to a .py file using pyside. Everything worked as expected, with the exception of the buttons. Out of 10 buttons, only 3 work as expected. Each button has a style sheet(they all share the same one). The style sheet gives the button a nicer look, but also adds "hover" and "pressed" instructions that you see on just about every button ever made. The problem is, the style sheet is applied (because all buttons have the "nicer look" i mentioned, but only a random 3 will actually change states upon hovering or pressing. It should also be noted that these instructions work perfectly in designers preview.
Denni 0 Banned last edited by
My first suggestion is stop using the UI Designer as you never learn what it is you are working with -- further it creates very crappy code that is not proper python-qt. If you would post that python UI code I can show you how easy it is to make it actual python-qt code and when you see that you will get a better understanding of what your objects are actually doing and work