add quick item to quick view dynamically

This commit is contained in:
王劲鹏
2021-02-19 15:43:09 +08:00
committed by osborn
parent df8b98bc6c
commit 7ced952a57
15 changed files with 97 additions and 20 deletions

View File

@@ -1,13 +1,19 @@
#include "DoricShaderPlugin.h"
#include <QDebug>
#include "../shader/DoricRootNode.h"
#include "DoricShaderPlugin.h"
void DoricShaderPlugin::render(QJSValue jsValue, QString callbackId) {
qDebug() << getContext();
getContext()->getDriver()->asyncCall(
[this, jsValue] {
QString viewId = jsValue.property("id").toString();
getContext()->getDriver();
DoricRootNode *rootNode = getContext()->getRootNode();
if (rootNode->getId().isEmpty() && jsValue.property("type").toString() == "Root") {
rootNode->setId(viewId);
rootNode->blend(jsValue.property("props"));
}
},
DoricThreadMode::UI);
}