From f166e18bfc97606073252b1c0f2855bb147c4e4d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 30 Oct 2020 16:31:48 +0200 Subject: [PATCH] QmlDesigner: Fix form editor occasionally failing to load content It seems that form editor widget gets enabled when design mode is opened, whether or not the form view is enabled. Therefore we need to check the view's enable state in FormEditorWidget::showEvent rather than widget's state to make the form editor content setup properly. Change-Id: Ie865b98bb4c9f884f9297fe32fbf7ee02455e74e Fixes: QDS-2926 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/formeditorwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index d57bae3583a..aeaa3c1e9d1 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -529,7 +529,7 @@ void FormEditorWidget::showEvent(QShowEvent *event) { QWidget::showEvent(event); - const bool wasEnabled = isEnabled(); + const bool wasEnabled = m_formEditorView->isEnabled(); m_formEditorView->setEnabled(true); if (!wasEnabled && m_formEditorView->model()) {