aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktreeviewdelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquicktreeviewdelegate.cpp')
-rw-r--r--src/quicktemplates2/qquicktreeviewdelegate.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktreeviewdelegate.cpp b/src/quicktemplates2/qquicktreeviewdelegate.cpp
index b233020702..1636afbfa1 100644
--- a/src/quicktemplates2/qquicktreeviewdelegate.cpp
+++ b/src/quicktemplates2/qquicktreeviewdelegate.cpp
@@ -216,6 +216,13 @@ void QQuickTreeViewDelegate::mousePressEvent(QMouseEvent *event)
{
QQuickAbstractButton::mousePressEvent(event);
+ if (event->buttons() != Qt::LeftButton || event->modifiers() != Qt::NoModifier) {
+ // Allow application to add its own pointer handlers that does something
+ // other than plain expand/collapse if e.g holding down modifier keys.
+ event->ignore();
+ return;
+ }
+
const auto indicator = QQuickAbstractButton::indicator();
if (indicator && indicator->isVisible()) {
const auto posInIndicator = mapToItem(indicator, event->position());