summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2012-07-10 15:57:36 +0400
committerIvan Komissarov <ABBAPOH@gmail.com>2014-08-06 15:19:22 +0200
commit54ca39afec6c3a175da085a704772b28f42bc274 (patch)
treeddd4b9baebad197794dd3cd88908b719fa0ed260 /src/widgets/styles
parente3e2e6877499ac6a151691e79d51850b9dad8941 (diff)
Add the QTabBar::changeCurrentOnDrag property.
This property indicates that the current tab will change whilst dragging over the tabbar [ChangeLog][QtWidgets][QTabBar] Added changeCurrentOnDrag property. Change-Id: Ib7d5a7613c9cd8432b84c523f66c02cd6c3c3c81 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.cpp4
-rw-r--r--src/widgets/styles/qstyle.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index d8b67edff8..cc24c79c09 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -5109,6 +5109,9 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
case SH_TabBar_CloseButtonPosition:
ret = QTabBar::RightSide;
break;
+ case SH_TabBar_ChangeCurrentDelay:
+ ret = 500;
+ break;
#endif
case SH_DockWidget_ButtonsHaveFrame:
ret = true;
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 8774d71c0c..fb5a5c9003 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1930,6 +1930,10 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SH_Splitter_OpaqueResize Determines if resizing is opaque
This enum value has been introduced in Qt 5.2
+ \value SH_TabBar_ChangeCurrentDelay Determines the delay before the current
+ tab is changed while dragging over the tabbar, in milliseconds. This
+ enum value has been introduced in Qt 5.4
+
\sa styleHint()
*/
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index ea012faf46..87fd7656ea 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -704,6 +704,7 @@ public:
SH_Splitter_OpaqueResize,
SH_ComboBox_UseNativePopup,
SH_LineEdit_PasswordMaskDelay,
+ SH_TabBar_ChangeCurrentDelay,
// Add new style hint values here
SH_CustomBase = 0xf0000000