Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P3: Somewhat important
-
Resolution: Unresolved
-
Affects Version/s: 5.14.2
-
Fix Version/s: None
-
Component/s: Widgets: Styles, Widgets: Widgets and Dialogs
-
Labels:None
-
Platform/s:
Description
The only place to update QAbstractSpinBoxPrivate::stepModifier is the QAbstractSpinBox::changeEvent virtual method. This method will not be called if style inheriting logic is called from the QWidget constructor (in this case QWidget::changeEvent handler will be called; also, calling virtual event handlers from constructor is not a good idea). I attached a simple way to reproduce this issue.
I suggest using QCoreApplication::postEvent in QWidgetPrivate::setStyle_helper. Another way to fix is not to store step modifier as class field and query SH_SpinBox_StepModifier every time it is needed.