Where should I define Connection type in Signal and Slot, whenever We use Lambada?
Unsolved
General and Desktop
-
auto expCompleteHandler = [=](const QUuid &id) { }; QList<QMetaObject::Connection> m_connections << QObject::connect(m_mainWindow, &MainWindow::ExperimentCompleted, expCompleteHandler);
Where to define Connection type in above function?
I know on way is
QObject::connect(SenderObj,SIGNAL(Signal_name),ReciverObject,SLOT(Slot_name),Qt::QueuedConnection). -
Hi,
Do you mean like with this overload of QObject::connect ?
-
What version of Qt are you using ?
-
Just tested with 5.10 on macOS and it's working as expected.
By the way, AutoConnection is the default, so unless you plan to change it, there's no real need to add it.