From 54ca39afec6c3a175da085a704772b28f42bc274 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Tue, 10 Jul 2012 15:57:36 +0400 Subject: 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 --- src/widgets/widgets/qtabbar.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/widgets/widgets/qtabbar.h') diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h index a1616b1524..34c3d93114 100644 --- a/src/widgets/widgets/qtabbar.h +++ b/src/widgets/widgets/qtabbar.h @@ -71,6 +71,7 @@ class Q_WIDGETS_EXPORT QTabBar: public QWidget Q_PROPERTY(bool movable READ isMovable WRITE setMovable) Q_PROPERTY(bool documentMode READ documentMode WRITE setDocumentMode) Q_PROPERTY(bool autoHide READ autoHide WRITE setAutoHide) + Q_PROPERTY(bool changeCurrentOnDrag READ changeCurrentOnDrag WRITE setChangeCurrentOnDrag) public: explicit QTabBar(QWidget* parent=0); @@ -170,6 +171,9 @@ public: bool autoHide() const; void setAutoHide(bool hide); + bool changeCurrentOnDrag() const; + void setChangeCurrentOnDrag(bool change); + public Q_SLOTS: void setCurrentIndex(int index); @@ -200,6 +204,7 @@ protected: #endif void keyPressEvent(QKeyEvent *); void changeEvent(QEvent *); + void timerEvent(QTimerEvent *event); void initStyleOption(QStyleOptionTab *option, int tabIndex) const; #ifndef QT_NO_ACCESSIBILITY -- cgit v1.2.3