forked from qt-creator/qt-creator
EffectMaker: Enable using project assets as effect textures
Also fixed few warnings by adding dummy needed context properties. Change-Id: Ieed0f9d409302ba9ff1409b9081cda942e46d2e9 Reviewed-by: Amr Elsayed <amr.elsayed@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include "qqmlcontext.h"
|
||||
#include "theme.h"
|
||||
|
||||
#include "qmldesigner/components/propertyeditor/assetimageprovider.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <studioquickwidget.h>
|
||||
@@ -136,6 +138,11 @@ void EffectMakerWidget::initView()
|
||||
m_backendModelNode.setup(m_effectMakerView->rootModelNode());
|
||||
m_quickWidget->rootContext()->setContextProperty("anchorBackend", &m_backendAnchorBinding);
|
||||
m_quickWidget->rootContext()->setContextProperty("modelNodeBackend", &m_backendModelNode);
|
||||
m_quickWidget->rootContext()->setContextProperty("activeDragSuffix", "");
|
||||
|
||||
m_quickWidget->engine()->addImageProvider("qmldesigner_thumbnails",
|
||||
new QmlDesigner::AssetImageProvider(
|
||||
QmlDesigner::QmlDesignerPlugin::imageCache()));
|
||||
|
||||
// init the first load of the QML UI elements
|
||||
reloadQmlSource();
|
||||
|
||||
Reference in New Issue
Block a user