diff options
author | Eike Hein <hein@kde.org> | 2015-04-09 23:36:38 +0200 |
---|---|---|
committer | Eike Hein <hein@kde.org> | 2015-04-10 12:27:38 +0000 |
commit | 417a2210725f4aad83688b494fbc9d45342c134a (patch) | |
tree | 20beb88c3bd2ad297fa1e66fc6e6f1cfb9c18b43 /src/gui/kernel/qstylehints.cpp | |
parent | 34ec0713bb5a2bc12782ab17ceabfead37c4b584 (diff) |
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 <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qstylehints.cpp')
-rw-r--r-- | src/gui/kernel/qstylehints.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index b7af2e759f..7ff0f9f860 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -377,4 +377,16 @@ Qt::TabFocusBehavior QStyleHints::tabFocusBehavior() const return Qt::TabFocusBehavior(themeableHint(QPlatformTheme::TabFocusBehavior, QPlatformIntegration::TabFocusBehavior).toInt()); } +/*! + \property QStyleHints::singleClickActivation + \brief \c true if items should be activated by single click, \b false + if they should be activated by double click instead. + + \since 5.5 +*/ +bool QStyleHints::singleClickActivation() const +{ + return themeableHint(QPlatformTheme::ItemViewActivateItemOnSingleClick, QPlatformIntegration::ItemViewActivateItemOnSingleClick).toBool(); +} + QT_END_NAMESPACE |