add slider item
This commit is contained in:
@@ -189,7 +189,7 @@ void DoricViewNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
|
||||
view->setProperty("shadowOffsetY", prop["offsetY"].toDouble());
|
||||
view->setProperty("shadowOpacity", prop["opacity"].toDouble());
|
||||
} else if (name != "layoutConfig") {
|
||||
qCritical() << "unhandled prop: " << name << ": " << prop.toString();
|
||||
qCritical() << mType << " unhandled prop: " << name << ": " << prop.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1 +1,20 @@
|
||||
#include "DoricSlideItemNode.h"
|
||||
|
||||
QQuickItem *DoricSlideItemNode::build() {
|
||||
QQmlComponent component(getContext()->getQmlEngine());
|
||||
|
||||
const QUrl url(QStringLiteral("qrc:/doric/qml/slide-item.qml"));
|
||||
component.loadUrl(url);
|
||||
|
||||
if (component.isError()) {
|
||||
qCritical() << component.errorString();
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
this->createLayouts(item);
|
||||
|
||||
getLayouts()->setLayoutType(DoricLayoutType::DoricStack);
|
||||
|
||||
item->setProperty("wrapper", QString::number((qint64)this));
|
||||
return item;
|
||||
}
|
||||
|
@@ -8,6 +8,8 @@
|
||||
class DORIC_EXPORT DoricSlideItemNode : public DoricStackNode {
|
||||
public:
|
||||
using DoricStackNode::DoricStackNode;
|
||||
|
||||
QQuickItem *build() override;
|
||||
};
|
||||
|
||||
#endif // DORICSLIDEITEMNODE_H
|
||||
|
Reference in New Issue
Block a user