Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97255

QAbstractSpinBox step modifier is not always synchronized with QStyle::SH_SpinBox_StepModifier

    XMLWordPrintable

Details

    • All

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            vlad.yareschenko Vlad Yareschenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes