Compare commits
2 Commits
b1852ab1fa
...
07369cf3ec
| Author | SHA1 | Date | |
|---|---|---|---|
| 07369cf3ec | |||
| 92cc2ad9a2 |
@@ -347,10 +347,13 @@ T qDeserialize(const QByteArray & data, int version = -1) {
|
||||
/// qCallQueued(this, &MyClass::myFuncWithIntAndString, 0xAB, "string");
|
||||
template<typename O, typename F, typename... Args>
|
||||
void qCallQueued(O * o, F f, Args... args) {
|
||||
QMetaObject::invokeMethod(
|
||||
o,
|
||||
[o, f, args...]() { (o->*f)(args...); },
|
||||
Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(o, [o, f, args...]() { (o->*f)(args...); }, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
/// qCallQueued with lambda
|
||||
template<typename O, typename L>
|
||||
void qCallQueuedL(O * o, L func) {
|
||||
QMetaObject::invokeMethod(o, [func] { func(); }, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user