[Not Solved] Application name in Task bar of Windows?
-
You said that you right click on the icon in task manager? There's no name of the app under right click in task manager. It shows a context menu.
Did you maybe mean a shortcut pinned to the task bar? The one with the "start" menu?
If so then it has nothing to do with Qt. It's just how Windows shortcuts work. If you pin a shortcut it will show the name of the shortcut. If you want it to show the app name pin the app itself. -
@Chris I am extremely sorry for my typo.
I meant Task Bar only.
It may be pinned or may not be pinned.
For both situations it is behaving wrongly.@xklz Thanks a lot!
I will try it & get back to you.
Hope that it solves many of my questions :) -
Hi xklz,
Sorry to say but your code simply has no effect on my application.
Not a single thing has changed.
Probably this has got anything to do with the compiler?
I am using the MinGW compiler that comes with Qt 4.8.1 SDK. -
You should try to state your problems in a clear and understandable manner. As it seems, I am not the only one who doesn't understand what your problem even is.
There are a couple of things in the taskbar:a) The Start-button. Nothing to do with your application.
b) Quick launch area right next to the start button. The shortcuts there are never named after a program, since one point of a shortcut is to use custom names. So, again, this has nothing to do with your application.
c) Free space between quick launch and tray icons. Not related to your application.
d) The tray icons. One of these might belong to your application, a tooltips text is set by using QSystemTrayIcon::setToolTip(QString). A right click might reveal a context menu, but that is completely under your control.
e) The clock and that other thing right next to it. Not related to your application.
f) The symbol that represents a running application. Right click on it does not show its name but rather offers a context menu. The name of the symbol can be set via QWidget::setWindowTitle(QString).
g) If I missed a case, you need to specify your problem in a much better way. If I didn't, that applies too - guesswork shouldn't be necessary.Hence, you are probably talking about what Chris Kawa mentioned ( b), for reference): You are looking at a shortcut that was named by you, explicitly. It's name is not chosen by Windows or the programmer of the application it points to, but by the end-user alone.
-
Yes I meant the Quick launch area!
Sorry for not being technical enough.
What I meant was that if my application is not pinned to the task bar, and I launch the application by double clicking the exe, then it is showing "myApp.exe" when I right click the icon for my application in the quick launch area.
I wanted it to show "My App" instead.
If I similarly run VLC Media Player, it is correctly showing "VLC Media Player". So I thought there must be an option to specify the string to be displayed.
But as you say it is controlled by Windows & Qt cannot do anything, it is fine with me. -
Isn't VLC created with Qt?
I am still not exactly sure what you mean, but I am fairly certain that the solution to your problem lies in this thread. You just have to pick the correct one.
I have a self-created Qt-application in my systray (it shows the name I set in the code), in my quicklaunch area (it shows the name I picked for the shortcut) and when the window is open, it shows the correct name. So I think I should be able to witness your problem if it was indeed a problem of Qt.
Did you try "this":http://qt-project.org/doc/qt-5.1/qtgui/qguiapplication.html#applicationDisplayName-prop or "this":http://qt-project.org/doc/qt-5.1/qtcore/qcoreapplication.html#applicationName-prop ? -
Ah, I'm a little slow on the uptake but I finally got what you mean.
And better yet - I've got an answer for you :)Ok, so it's a little complicated (as always with windows), so I'll walk you through it.
First of all you have to include a resource file (.rc) as posted by xklz. The field you're interested in is "FileDescription". You can verify that it is included ok by going to the resulting exe properties and checking the description field.Now if you run your exe you will notice that it doesn't work (some advice I gave you, huh?).
But! Copy it somewhere else (anywhere really) and try again. Ahha. Now it's working.So what the heck is going on?
Well, Windows has this (un)friendly feature called MUI Cache, that spies on what apps you run and caches some info about them like the friendly name and company (probably to speed things up by not reading it from exe directly every time it needs it). It is then stored in the registry here:
HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCacheFind your app on the list and remove any info you find (actually for the name just the X:\your\app\path\app.exe.FriendlyAppName is enough).
Run your app now from the old location and it should do what you want. Note though, that you need to repeat that every time you change the name in your app. -
Hi Chris,
Sorry I could not reply you earlier.I tried every step you mentioned above with great care. But I could not achieve Windows to identify the "file description" tag.
It just kept it blank.
I dont understand what could be the problem.
Maybe Qt 4.8.1 or MinGW or my laptop itself or I am doing something wrong.
I think I will just let it be...
I appreciate your concern & thanks for your help.... -
It's quite an old topic. However for those who may need the answer:
If you have set RC_FILE or RES_FILE in .pro, then you must have written your own .rc file. Just write FileDescription in it. You can use Google if you don't know how.
Otherwise you can set QMAKE_TARGET_DESCRIPTION in you .pro file but you also need either VERSION or RC_ICONS set (to trigger auto-generation of an .rc file by qmake).
And remember to remove the old info in HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCache as mentioned above.