Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.0 RC
-
None
Description
when loading a qml file with QQuickView::setSource, at he time the item executes Component.onCompleted the item still has no parent, only afterwards it will be set to QQuickWindow::contentItem(), but code that relies on a parent and a window to be there at item creation, like QtQuickControls Dialog will be broken.
so if a Dialog is created inside an item loaded this way, calling open() on it will have no effect.
The problem can be kinda worked around by doing
setInitialProperties(QStringLiteral("parent"), QVariant::fromValue(contentItem()));
prior to setSource