mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
15 lines
281 B
C++
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);
|
||
|
}
|