add vlayout node & stack node

This commit is contained in:
王劲鹏
2021-02-23 14:28:08 +08:00
committed by osborn
parent 1c574f030c
commit a38b998b60
14 changed files with 402 additions and 20 deletions

View File

@@ -1,11 +1,13 @@
#include "DoricStackNode.h"
QQuickItem *DoricStackNode::build() {
QQmlComponent component;
QQmlComponent component(getContext()->getQmlEngine());
const QUrl url(QStringLiteral("qrc:/doric/qml/stack.qml"));
component.loadUrl(url);
qCritical() << component.errorString();
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
return item;
}

View File

@@ -0,0 +1,13 @@
#include "DoricVLayoutNode.h"
QQuickItem *DoricVLayoutNode::build() {
QQmlComponent component(getContext()->getQmlEngine());
const QUrl url(QStringLiteral("qrc:/doric/qml/vlayout.qml"));
component.loadUrl(url);
qCritical() << component.errorString();
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
return item;
}

View File

@@ -0,0 +1,13 @@
#ifndef DORICVLAYOUTNODE_H
#define DORICVLAYOUTNODE_H
#include "DoricGroupNode.h"
class DoricVLayoutNode : public DoricGroupNode {
public:
using DoricGroupNode::DoricGroupNode;
QQuickItem *build() override;
};
#endif // DORICVLAYOUTNODE_H