I want to get the QProcess state and if it the state() returns “Running” then I want to do few operations but if I do like this
QProcess myprocess;
QString mystring = myprocess.state()
if(mystring=="Running")
{
//*My code
}
else
{
//*Other code
}
But actually this gives me error as error: conversion from 'QProcess::ProcessState' to non-scalar type 'QString' requested
I know I am doing this in a wrong way. Can anyway point me to correct way?
Thank you
myprocess.state() returns enum QProcess::ProcessState