always inserting the input grabber at the beginning so that

QQuickItem::childAt ( and squish ) are working
This commit is contained in:
Uwe Rathmann 2018-02-07 09:26:47 +01:00
parent f3467a4fa8
commit 2c72388239

View File

@ -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
{