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/demo_bridge.cpp

24 lines
431 B
C++
Raw Normal View History

2021-02-02 20:42:37 +08:00
#include <QDebug>
#include "demo_bridge.h"
#include "utils/utils.h"
#include "panel.h"
DemoBridge::DemoBridge(QObject *parent) : QObject(parent)
{
}
void DemoBridge::navigate(QVariant route)
{
switch (route.toInt()) {
case 0:
QString name = "Snake.js";
QString script = Utils::readAssetFile("/doric/bundles", name);
Panel panel;
panel.config(script, name, NULL);
break;
}
}