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
2021-05-20 18:27:45 +08:00

24 lines
431 B
C++

#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;
}
}