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