add super node & view node

This commit is contained in:
王劲鹏
2019-12-17 17:05:57 +08:00
parent b785685802
commit ad04078f88
9 changed files with 69 additions and 7 deletions

View File

@@ -14,6 +14,10 @@ Q_INVOKABLE void NativeBridge::function(int contextId, QString module, QString m
qDebug() << value;
if (value.contains("ShaderPlugin")) {
ShaderPlugin shaderPlugin(context);
QMetaObject::invokeMethod(&shaderPlugin, methodName.toStdString().c_str());
QMetaObject::invokeMethod(
&shaderPlugin,
methodName.toStdString().c_str(),
Qt::AutoConnection,
Q_ARG(QJSValue, jsValue));
}
}

View File

@@ -2,6 +2,6 @@
#include "native_empty.h"
void NativeEmpty::function() {
Q_INVOKABLE void NativeEmpty::function() {
qDebug() << "nativeEmpty";
}

View File

@@ -2,7 +2,7 @@
#include "native_log.h"
void NativeLog::function(QString level, QString content) {
Q_INVOKABLE void NativeLog::function(QString level, QString content) {
if (level == 'w') {
qWarning() << content;
} else if (level == 'd') {

View File

@@ -2,7 +2,7 @@
#include "native_timer.h"
void NativeTimer::setTimer(long timerId, int time, bool repeat) {
Q_INVOKABLE void NativeTimer::setTimer(long timerId, int time, bool repeat) {
QTimer *timer = new QTimer(this);
timer->setSingleShot(!repeat);
connect(timer, &QTimer::timeout, this, [=] () {