summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtabbar.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-23 11:39:36 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-23 11:39:45 (GMT)
commit4112771f56e827d1d8fbde0995ebf5b0242c01a8 (patch)
treea6bcbcdcf7da2acb833090f4d006ac81b8779c2b /src/gui/widgets/qtabbar.cpp
parent366af17676a87943c8a7c2380a8819bdd3815878 (diff)
parent50465c3409d699612a59b6c1d16e3502bb3a92fd (diff)
downloadQt-4112771f56e827d1d8fbde0995ebf5b0242c01a8.zip
Qt-4112771f56e827d1d8fbde0995ebf5b0242c01a8.tar.gz
Qt-4112771f56e827d1d8fbde0995ebf5b0242c01a8.tar.bz2
Merge oslo-staging-2/4.6 into upstream/4.6
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;