Hi Friends,
If anybody knows how to get Application name in qt ? it's like AfxGetAppName( ) function of MFC , Please help me,
Thanks
Rajesh.S
Printable View
Hi Friends,
If anybody knows how to get Application name in qt ? it's like AfxGetAppName( ) function of MFC , Please help me,
Thanks
Rajesh.S
Is it same than QCoreApplication::applicationFilePath()?
Thank you ,
This is returning App name with PAth,
I need only Appname,
Is it Possible,
Regards
Rajesh.S
So pick the file name with QFileInfo::fileName():
Or directly:
QString fileName = QFileInfo(QApplication::applicationFilePath()).fil eName();
Its Returning AppName.exe
From this i can get AppName,
It's very use ful reply Thank you for ur discussion and replies
Notice QFileInfo::baseName() also.