add image demo

This commit is contained in:
王劲鹏 2021-04-22 21:20:36 +08:00 committed by osborn
parent bbbe3d148a
commit 8ae5af13e9
4 changed files with 16 additions and 9 deletions

View File

@ -20,18 +20,21 @@ void DoricDemoBridge::navigate(QVariant route) {
name = "Gobang.js"; name = "Gobang.js";
break; break;
case 2: case 2:
name = "LayoutDemo.js"; name = "ImageDemo.js";
break; break;
case 3: case 3:
name = "ModalDemo.js"; name = "LayoutDemo.js";
break; break;
case 4: case 4:
name = "PopoverDemo.js"; name = "ModalDemo.js";
break; break;
case 5: case 5:
name = "SimpleDemo.js"; name = "PopoverDemo.js";
break; break;
case 6: case 6:
name = "SimpleDemo.js";
break;
case 7:
name = "Snake.js"; name = "Snake.js";
break; break;
} }

View File

@ -10,6 +10,7 @@
<qresource prefix="/doric/bundles"> <qresource prefix="/doric/bundles">
<file alias="Counter.js">../../doric-demo/bundle/src/Counter.js</file> <file alias="Counter.js">../../doric-demo/bundle/src/Counter.js</file>
<file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.js</file> <file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.js</file>
<file alias="ImageDemo.js">../../doric-demo/bundle/src/ImageDemo.js</file>
<file alias="LayoutDemo.js">../../doric-demo/bundle/src/LayoutDemo.js</file> <file alias="LayoutDemo.js">../../doric-demo/bundle/src/LayoutDemo.js</file>
<file alias="ModalDemo.js">../../doric-demo/bundle/src/ModalDemo.js</file> <file alias="ModalDemo.js">../../doric-demo/bundle/src/ModalDemo.js</file>
<file alias="PopoverDemo.js">../../doric-demo/bundle/src/PopoverDemo.js</file> <file alias="PopoverDemo.js">../../doric-demo/bundle/src/PopoverDemo.js</file>

View File

@ -15,7 +15,7 @@ ApplicationWindow {
ListView { ListView {
width: parent.width width: parent.width
model: 7 model: 8
delegate: Rectangle { delegate: Rectangle {
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
@ -27,14 +27,16 @@ ApplicationWindow {
case 1: case 1:
return "Gobang.js" return "Gobang.js"
case 2: case 2:
return "LayoutDemo.js" return "ImageDemo.js"
case 3: case 3:
return "ModalDemo.js" return "LayoutDemo.js"
case 4: case 4:
return "PopoverDemo.js" return "ModalDemo.js"
case 5: case 5:
return "SimpleDemo.js" return "PopoverDemo.js"
case 6: case 6:
return "SimpleDemo.js"
case 7:
return "Snake.js" return "Snake.js"
} }
} }

View File

@ -52,6 +52,7 @@ public:
castNode->mType = type; castNode->mType = type;
return castNode; return castNode;
} else { } else {
qCritical() << "DoricViewNode create error: " + type;
return nullptr; return nullptr;
} }
} }