From 2c72388239a42f00f103706ad05c68f4388123c2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 7 Feb 2018 09:26:47 +0100 Subject: [PATCH] always inserting the input grabber at the beginning so that QQuickItem::childAt ( and squish ) are working --- src/controls/QskPopup.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/controls/QskPopup.cpp b/src/controls/QskPopup.cpp index 4ecfaf5a..152b5706 100644 --- a/src/controls/QskPopup.cpp +++ b/src/controls/QskPopup.cpp @@ -223,7 +223,22 @@ void QskPopup::updateInputGrabber() if ( parentItem() && isVisible() && m_data->isModal ) { if ( m_data->inputGrabber == nullptr ) + { + const auto children = childItems(); + m_data->inputGrabber = new InputGrabber( this ); + if ( !children.isEmpty() ) + { + /* + Even if the input grabber has no content it has an effect + on QQuickItem::childAt. Also tools like Squish struggle with + sorting out items without content. + So let's better avoid any problems let's move the grabber to + the beginning of the children. + */ + m_data->inputGrabber->stackBefore( children.first() ); + } + } } else {