I run a Qt application, what I want to know is this running binary file name.
You can go to the Designer in Qt Creator and change the title of the object in settings,which are on the right side.
From: How to create executable file for a Qt Application? Basically you have to look for MinGW subfolder deep into Qt tree, where Qt utilities reside, and copy needed dll's. These are the steps I follow, based upon Qt 4.7. 4, for packaging the application with correct shared libraries.
Given its full path, you can easily get the name of the executable using QFileInfo::fileName() . Or QFileInfo( QCoreApplication::applicationFilePath() ). fileName() for the filename of the executable.
I must (partially) disagree with the other comments that it is not a Qt question: There is a Qt method QCoreApplication::applicationFilePath()
which gives the directory+filename of the executable.
On Linux this will try to use /proc
, and on Windows perhaps GetModuleFileName()
. According to the docs it will fall back to argv[0]
.
You could then use QFileInfo
to split it into an executable name and a directory.
QFileInfo(QCoreApplication::applicationFilePath()).fileName()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With