This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/demo/DoricDemoBridge.cpp

20 lines
442 B
C++
Raw Normal View History

2021-02-04 16:59:58 +08:00
#include <QDebug>
#include "DoricDemoBridge.h"
#include "DoricPanel.h"
#include "utils/DoricUtils.h"
DoricDemoBridge::DoricDemoBridge(QObject *parent) : QObject(parent) {}
void DoricDemoBridge::navigate(QVariant route) {
switch (route.toInt()) {
case 0:
2021-02-08 11:37:51 +08:00
QString name = "Snake.js";
2021-02-04 16:59:58 +08:00
QString script = DoricUtils::readAssetFile("/doric/bundles", name);
DoricPanel panel;
panel.config(script, name, NULL);
break;
}
}