summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtabbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qtabbar.cpp')
-rw-r--r--src/gui/widgets/qtabbar.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 3935c55..8ef6017 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1948,7 +1948,8 @@ void QTabBar::changeEvent(QEvent *event)
Q_D(QTabBar);
if (event->type() == QEvent::StyleChange) {
d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this));
- d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
+ if (!d->useScrollButtonsSetByUser)
+ d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this);
d->refresh();
} else if (event->type() == QEvent::FontChange) {
d->refresh();
@@ -2003,6 +2004,7 @@ bool QTabBar::usesScrollButtons() const
void QTabBar::setUsesScrollButtons(bool useButtons)
{
Q_D(QTabBar);
+ d->useScrollButtonsSetByUser = true;
if (d->useScrollButtons == useButtons)
return;
d->useScrollButtons = useButtons;