1
0
mirror of https://github.com/mappu/miqt.git synced 2025-04-12 16:40:23 +00:00

15 lines
281 B
C++

#include <QMetaObject>
#include <QCoreApplication>
#include "mainthread.h"
extern "C" {
void mainthread_exec_handle(intptr_t);
}
void mainthread_exec(intptr_t cb) {
QMetaObject::invokeMethod(qApp, [=]{
mainthread_exec_handle(cb);
}, Qt::QueuedConnection);
}