add popover demo

This commit is contained in:
王劲鹏 2021-04-22 14:54:31 +08:00 committed by osborn
parent d624272089
commit 80b97772d9
3 changed files with 10 additions and 4 deletions

View File

@ -4,8 +4,8 @@
#include "DoricDemoBridge.h" #include "DoricDemoBridge.h"
#include "DoricPanel.h" #include "DoricPanel.h"
#include "utils/DoricMouseAreaBridge.h"
#include "utils/DoricDialogBridge.h" #include "utils/DoricDialogBridge.h"
#include "utils/DoricMouseAreaBridge.h"
#include "utils/DoricUtils.h" #include "utils/DoricUtils.h"
DoricDemoBridge::DoricDemoBridge(QObject *parent) : QObject(parent) {} DoricDemoBridge::DoricDemoBridge(QObject *parent) : QObject(parent) {}
@ -26,9 +26,12 @@ void DoricDemoBridge::navigate(QVariant route) {
name = "ModalDemo.js"; name = "ModalDemo.js";
break; break;
case 4: case 4:
name = "SimpleDemo.js"; name = "PopoverDemo.js";
break; break;
case 5: case 5:
name = "SimpleDemo.js";
break;
case 6:
name = "Snake.js"; name = "Snake.js";
break; break;
} }

View File

@ -12,6 +12,7 @@
<file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.js</file> <file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.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="SimpleDemo.js">../../doric-demo/bundle/src/SimpleDemo.js</file> <file alias="SimpleDemo.js">../../doric-demo/bundle/src/SimpleDemo.js</file>
<file alias="Snake.js">../../doric-demo/bundle/src/Snake.js</file> <file alias="Snake.js">../../doric-demo/bundle/src/Snake.js</file>
</qresource> </qresource>

View File

@ -15,7 +15,7 @@ ApplicationWindow {
ListView { ListView {
width: parent.width width: parent.width
model: 6 model: 7
delegate: Rectangle { delegate: Rectangle {
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
@ -31,8 +31,10 @@ ApplicationWindow {
case 3: case 3:
return "ModalDemo.js" return "ModalDemo.js"
case 4: case 4:
return "SimpleDemo.js" return "PopoverDemo.js"
case 5: case 5:
return "SimpleDemo.js"
case 6:
return "Snake.js" return "Snake.js"
} }
} }