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
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
Last edited by rajeshs; 26th September 2007 at 06:51. Reason: Title changed
Thanks,
Rajesh.S
Is it same than QCoreApplication::applicationFilePath()?
J-P Nurmi
Thank you ,
This is returning App name with PAth,
I need only Appname,
Is it Possible,
Regards
Rajesh.S
Thanks,
Rajesh.S
So pick the file name with QFileInfo::fileName():
Qt Code:
To copy to clipboard, switch view to plain text mode
J-P Nurmi
Or directly:
Qt Code:
To copy to clipboard, switch view to plain text mode
rajeshs (27th September 2007)
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
Thanks,
Rajesh.S
Notice QFileInfo::baseName() also.
J-P Nurmi
Bookmarks