From 417a2210725f4aad83688b494fbc9d45342c134a Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Thu, 9 Apr 2015 23:36:38 +0200 Subject: Expose ItemViewActivateItemOnSingleClick in QStyleHints This completes support for ItemViewActivateItemOnSingleClick in QPlatformIntegration and exposes the setting in QStyleHints. Based on the review process, the public name used is 'singleClickActivation' for brevity, as well as to avoid con- fusion over alluding to "item views" in the Qt Quick context. KDE Plasma intends to use this via Qt.styleHints to have Qt Quick-based UI correctly implement the global single vs. double click user preference for item activation. [ChangeLog][QtGui] Added QStyleHints::singleClickActivation to access whether the platform expects item activation to occur on single clicks rather than double clicks. Change-Id: I0916e9e68c3a157f95053da8227b2612803653f7 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qstylehints.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qstylehints.h') diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index 5fbc851ee9..82eb8a6f7d 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -61,6 +61,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL) Q_PROPERTY(bool useRtlExtensions READ useRtlExtensions STORED false CONSTANT FINAL) Q_PROPERTY(Qt::TabFocusBehavior tabFocusBehavior READ tabFocusBehavior STORED false CONSTANT FINAL) + Q_PROPERTY(bool singleClickActivation READ singleClickActivation STORED false CONSTANT FINAL) public: void setMouseDoubleClickInterval(int mouseDoubleClickInterval); @@ -83,6 +84,7 @@ public: bool useRtlExtensions() const; bool setFocusOnTouchRelease() const; Qt::TabFocusBehavior tabFocusBehavior() const; + bool singleClickActivation() const; Q_SIGNALS: void cursorFlashTimeChanged(int cursorFlashTime); -- cgit v1.2.3