Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.2
-
None
-
all
-
70c053ee684448984b1f762abd3b40884cece2fa (qt/qtbase/5.14)
Description
spincontrol-disable-on-bounds style sheet hint is not properly checked on QAbstractSpinBox instances.
Small testcase:
#include <QtWidgets> int main(int argc, char **argv) { QApplication app(argc, argv); QSpinBox sb; // since the default is true in qcommonstyle, we have to set to 0 to see an effect sb.setStyleSheet("QSpinBox { spincontrol-disable-on-bounds: 0; } "); sb.show(); return app.exec(); }
The problem is in the following method:
qabstractspinbox.cpp:
void QAbstractSpinBox::initStyleOption(QStyleOptionSpinBox *option) const
The call to styleHint() in this methid should pass "this" as a third argument.