From b7bf3dd5fea0c61f25d4ce4e20623853b8f4e7a9 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 16 Sep 2020 14:12:55 +0200 Subject: [PATCH] Revert "Cannot input Korean in FromEditor/Property panel" This reverts commit df696a34b5c47634dfe83f115e28f57d688aff72. The commit breaks functionality of Controls in the Property Editor. * No longer possible to go into edit mode by clicking on a SpinBox * Drag manipulation is not working on a SpinBox * Non editable ComboBox can't be opened by clicking on the value Change-Id: I330fb96b4c72eba72a5a9716a211397dd0c6b8e9 Reviewed-by: Miikka Heikkinen Reviewed-by: Thomas Hartmann --- .../propertyeditor/propertyeditorqmlbackend.cpp | 2 +- .../propertyeditor/quick2propertyeditorview.cpp | 12 +++--------- .../propertyeditor/quick2propertyeditorview.h | 9 ++------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index c20f090b192..bf2243d09fc 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -361,7 +361,7 @@ PropertyEditorContextObject* PropertyEditorQmlBackend::contextObject() { } QWidget *PropertyEditorQmlBackend::widget() { - return m_view->widget(); + return m_view; } void PropertyEditorQmlBackend::setSource(const QUrl& url) { diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp index b7b356d894d..7032a26ef76 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp @@ -45,16 +45,10 @@ namespace QmlDesigner { Quick2PropertyEditorView::Quick2PropertyEditorView(QWidget *parent) : - QQuickView() + QQuickWidget(parent) { - setResizeMode(QQuickView::SizeRootObjectToView); + setResizeMode(QQuickWidget::SizeRootObjectToView); Theme::setupTheme(engine()); - m_widget = QWidget::createWindowContainer(this, parent); -} - -QWidget *Quick2PropertyEditorView::widget() -{ - return m_widget; } void Quick2PropertyEditorView::registerQmlTypes() @@ -104,7 +98,7 @@ bool Quick2PropertyEditorView::event(QEvent *e) } } - return QQuickView::event(e); + return QQuickWidget::event(e); } } //QmlDesigner diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h index fba3eca934b..c2c0ba9f36f 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h +++ b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h @@ -25,27 +25,22 @@ #pragma once -#include +#include namespace QmlDesigner { -class Quick2PropertyEditorView : public QQuickView +class Quick2PropertyEditorView : public QQuickWidget { Q_OBJECT public: explicit Quick2PropertyEditorView(QWidget *parent = nullptr); - QWidget *widget(); - static void registerQmlTypes(); protected: bool event(QEvent *e) override; - -private: - QWidget *m_widget; }; } //QmlDesigner