forked from qt-creator/qt-creator
QmlDesigner: Read contentItem after completing
This avoids issues with deferred properties. Change-Id: Ie9cc0eaa3468bcb21e4817f8c5e3c1b97c8fc99c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
9c6061be9b
commit
906d2ac9b5
@@ -193,14 +193,14 @@ void QuickItemNodeInstance::doComponentComplete()
|
|||||||
{
|
{
|
||||||
ObjectNodeInstance::doComponentComplete();
|
ObjectNodeInstance::doComponentComplete();
|
||||||
|
|
||||||
QQmlProperty contentItemProperty(quickItem(), "contentItem", engine());
|
|
||||||
if (contentItemProperty.isValid())
|
|
||||||
m_contentItem = contentItemProperty.read().value<QQuickItem*>();
|
|
||||||
|
|
||||||
QmlPrivateGate::disableTextCursor(quickItem());
|
QmlPrivateGate::disableTextCursor(quickItem());
|
||||||
|
|
||||||
DesignerSupport::emitComponentCompleteSignalForAttachedProperty(quickItem());
|
DesignerSupport::emitComponentCompleteSignalForAttachedProperty(quickItem());
|
||||||
|
|
||||||
|
QQmlProperty contentItemProperty(quickItem(), "contentItem", engine());
|
||||||
|
if (contentItemProperty.isValid())
|
||||||
|
m_contentItem = contentItemProperty.read().value<QQuickItem*>();
|
||||||
|
|
||||||
quickItem()->update();
|
quickItem()->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user