diff options
-rw-r--r-- | src/widgets/styles/qstyleoption.cpp | 3 | ||||
-rw-r--r-- | src/widgets/styles/qstyleoption.h | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qprogressbar.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index f642a05d13..c1cb732cc2 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -1634,6 +1634,9 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version) \brief the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal + \deprecated + Use the QStyle::State_Horizontal flag instead (in the the QStyleOption::state member). + \sa QProgressBar::orientation */ diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h index 94ec55002a..85d33f5444 100644 --- a/src/widgets/styles/qstyleoption.h +++ b/src/widgets/styles/qstyleoption.h @@ -325,7 +325,7 @@ public: QString text; Qt::Alignment textAlignment; bool textVisible; - Qt::Orientation orientation; + Qt::Orientation orientation; // ### Qt 6: remove bool invertedAppearance; bool bottomToTop; diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp index 123cb5bd6e..b188318ee7 100644 --- a/src/widgets/widgets/qprogressbar.cpp +++ b/src/widgets/widgets/qprogressbar.cpp @@ -140,7 +140,7 @@ void QProgressBar::initStyleOption(QStyleOptionProgressBar *option) const if (QStyleOptionProgressBarV2 *optionV2 = qstyleoption_cast<QStyleOptionProgressBarV2 *>(option)) { - optionV2->orientation = d->orientation; // ### Qt 5: use State_Horizontal instead + optionV2->orientation = d->orientation; // ### Qt 6: remove this member from QStyleOptionProgressBarV2 optionV2->invertedAppearance = d->invertedAppearance; optionV2->bottomToTop = (d->textDirection == QProgressBar::BottomToTop); } |