add target node view & set width, height

This commit is contained in:
王劲鹏
2021-02-23 18:26:00 +08:00
committed by osborn
parent 4c0a177747
commit 028334e530
4 changed files with 25 additions and 3 deletions

View File

@@ -35,9 +35,15 @@ void DoricViewNode::blend(QJSValue jsValue) {
void DoricViewNode::blend(QQuickItem *view, QString name, QJSValue prop) {
if (name == "width") {
view->setWidth(100);
if (!prop.isNumber()) {
return;
}
view->setWidth(prop.toInt());
} else if (name == "height") {
view->setHeight(100);
if (!prop.isNumber()) {
return;
}
view->setHeight(prop.toInt());
} else if (name == "backgroundColor") {
}
}