I have the following code in main
QProcess process;
QObject::connect(&process, &QProcess::error, [](QProcess::ProcessError error)
{
qDebug() << error;
}, Qt::QueuedConnection);
bool launched = process.startDetached("D:\temp.exe");
and it is generating this error while compiling
D:\main.cpp:5: error: C2665: 'QObject::connect' : none of the 3 overloads could convert all the argument types c:\qt\5.3\msvc2013_64\include\qtcore\qobject.h(205): could be
'QMetaObject::Connection QObject::connect(const QObject *,const char
*,const char *,Qt::ConnectionType) const' c:\qt\5.3\msvc2013_64\include\qtcore\qobject.h(201): or
'QMetaObject::Connection QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)' c:\qt\5.3\msvc2013_64\include\qtcore\qobject.h(198): or
'QMetaObject::Connection QObject::connect(const QObject *,const char
*,const QObject *,const char *,Qt::ConnectionType)' while trying to match the argument list '(QProcess *, overloaded-function, RunGUIMode::<lambda_5d6e7ee926a623cea2a0e4469253d55f>, Qt::ConnectionType)'
can someone please help me out and tell me what i am doing wrong.
I want to connect a signal from the QProcess
class to my lambda