Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get Application Name ..
qtdev last edited by
int main(int argc, char *argv)
QCoreApplication a(argc, argv);
QProcess process; process.setReadChannel(QProcess::StandardOutput); process.setReadChannelMode(QProcess::MergedChannels);
// process.start("cmd.exe /C echo test");
process.start("wmic.exe /OUTPUT:STDOUT PROCESS get Caption");
process.waitForStarted(1000); process.waitForFinished(1000); QByteArray list = process.readAll(); qDebug() << "Read" << list.length() << "bytes"; qDebug() << list;
I use this program to list out all process which are running.. but i want to get application names which started by user and they are at running state..like vlc media player,ms word etc. ..
Thanks in advance..
Gerolf: Added code tags
koahnig last edited by
Please use "code wrappings as explained here":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 This makes your code readable.