qml: Implement QWidgetAdapter::parentWidget()

Frame gets access to its DropArea now
This commit is contained in:
Sergio Martins
2020-07-28 22:25:09 +01:00
parent 1286fc28ca
commit 6738bb0ae1
2 changed files with 14 additions and 1 deletions

View File

@@ -145,6 +145,19 @@ void QWidgetAdapter::showNormal()
QWindow *QWidgetAdapter::windowHandle() const { return nullptr; }
QWidgetAdapter *QWidgetAdapter::parentWidget() const
{
QQuickItem *p = parentItem();
while (p) {
if (auto qa = qobject_cast<QWidgetAdapter*>(p))
return qa;
p = p->parentItem();
}
return nullptr;
}
void QWidgetAdapter::move(int x, int y)
{
qDebug() << Q_FUNC_INFO << x << y << this;