PDA

View Full Version : QProcess not working in some cases



munna
1st August 2006, 07:56
Hi,

I am on win xp/Qt4.1.3

I have a few labels on my mainwindow and on press i have to launch few apps.

Here is my code




void IconLabel::mousePressEvent(QMouseEvent *)
{
QProcess process;
if( !process.startDetached(appPath) ){
QMessageBox::warning(this,QString(),tr("Cannot launch app"));
}
}



While C:/WINDOWS/system32/notepad.exe launches correctly C:/Program Files/KDE PIM/kapi_me.exe does not lauch. But when I double click on the exe it works fine.

Any ideas why this is not working ?

Thanks a lot

jpn
1st August 2006, 09:58
C:/Program Files/KDE PIM/kapi_me.exe
Have you tried wrapping the path into quotes (http://doc.trolltech.com/4.1/qprocess.html#start-2)?