Starting telnet from Qt application
-
I need to start telnet on Qt application using Qprocess. I have the following implemented but it does not seem to work.
@
// calling function
QStringList args;
dbg1Socket = new QProcess(this);
connect(dbg1Socket, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(debug1_stateChanged QProcess::ProcessState)));
args << getIPAddress() + " 1705";
dbg1Socket->start("telnet.exe", args);void test::debug1_stateChanged(QProcess::ProcessState state)
{
if (state == QProcess::NotRunning)
qDebug() << "Unable to start telnet.";
else if (state == QProcess::Starting)
qDebug() << "Telnet starting...";
else if (state == QProcess::Running)
{
qDebug() << "Telnet program started";
connect(dbg1Socket, SIGNAL(readyReadStandardOutput()), this, SLOT(readDebug1()));
}
}
@I always get this output -
Telnet starting...
Unable to start telnet.Can someone tell me what I am doing wrong? Thanks!
-