Solved QPushButton with stylesheet not working in 5.15.0
-
I have a complicated form based around a couple of QStackedWidgets. It has some stylesheets to add rounded corners and gradient backgrounds to the buttons. In 5.9.x it was working fine but in 5.15.0 the buttons inside the QStackedWidget do not respond to mouse clicks but the buttons outside of the QStackedWidget function as expected. Also if I remove the stylesheets the buttons work correctly. The issue is the same in my built app and in Designer. In Designer from 5.9 it works OK but in Designer from 5.15 it has the problem.
I'm just wondering if anyone else has noticed similar behaviour or has a workaround?
-
@glennr
This is purely a vague recollection from some post I think I saw recently: what platform are you? I thought I saw an issue like this if you are macOS...? -
I face same problem with QTabWidget. Outsied tab widget its working. I am using QT 5.14. If anyone has solution please share
-
@Imran-Hassan
Exactly the same question to you as to the OP: don't you think it's relevant to state what OS(es) this does or does not function on, if you are looking for help? -
@JonB Sorry, was focusing on the problem and forgot to mention the platform. Its on MacOS (10.15.5, Xcode 11.5). I'm in the middle of getting it set up on Windows so will report when I have that tested.
-
@glennr
Then is your situation as reported in https://forum.qt.io/topic/116234/stylesheet-breaks-qpushbutton-pressed-on-macos ? -
@JonB said in QPushButton with stylesheet not working in 5.15.0:
@glennr
Then is your situation as reported in https://forum.qt.io/topic/116234/stylesheet-breaks-qpushbutton-pressed-on-macos ?Yes, that is it.
-
Found it in the bug tracker https://bugreports.qt.io/browse/QTBUG-84879 Looks like it will be fixed in 5.15.1.