[SOLVED] System tray icon
-
Hello... I woulld like to know if I can force system tray icon to be changed... I am using program developed by Qt, but I don't like its system tray icon... So I am wondering if there is any way using Qt or Microsoft Visual Studio to change tray icon...
Something like "this":http://www.gdgsoft.com/gconvert/
Thanks in advance
-
Hi,
Are you using "QSystemTrayIcon":http://qt-project.org/doc/qt-5/QSystemTrayIcon.html in your application ?
-
Hi... You did not understand my post... Application is not mine, but I know its developed by Qt... I am just user and I don't have access to source code... I want to force icon change to the application that is already running...
-
Hi,
Unless the icon is loaded from your hard drive or the original author offers some way of customizing it, you can't
-
Aha... Thank you
EDIT: What about force minimizing and maximizing Qt app (I am just user) from system tray? I know that is possible to do, maybe you know how?
Application already has built in minimize... However, I am running multiple applications 35 and have them minimized in system tray... Problem is that I never know which one is correct, so I have to open all of them... So I want to create my own app that will control these applications... I want to minimize and maximize ones that I want to use at the moment... Their names and which one is correct I could probably find with processes...
Similar to "this":http://social.msdn.microsoft.com/Forums/vstudio/en-US/9bde4870-1599-4958-9ab4-902fa98ba53a/how-do-i-maximizeminimize-applications-programmatically-in-c?forum=csharpgeneral but with Qt, if possible...
-
Code below works with Notepad and minimize it fine... It also works with Qt application that is currently running with debugger and is executing that code below... However, it does not work with Qt app which I want to minimize...
@
void Test1::test()
{
HWND hwnd = FindWindow(NULL, L"appName");
if (hwnd != 0)
{
ShowWindow(hwnd, SW_MINIMIZE);
ui.label->setText("Window was found!");
}
else
{
ui.label->setText("Window was not found.");
}
}@Both applications below are built with Qt... For some reason I can minimize / maximize first one, but I can't do the same with second one... I just can't figure out where is the problem...
This one works...
!http://i.imgur.com/GEf6O9L.png(W)!This one does not work...
!http://i.imgur.com/zbyjZ69.png(DW)! -
Just use the showMaximized and showMinimized slots
-
How can I do that? I guess you did not understand what I wrote... I am trying to minimize / maximize application which is built with Qt, but its not mine and I don't have its source code...
-
You might not be looking for the right name maybe use FindWindow with GetWindowText. However it's outside of this forum scope, you should rather ask on the MSDN forums
-
Hey thanks for your answer... I already asked on MSDN forum and received answer there...
EDIT: Not closing yet
On MSDN forum they have told me to deal with "this":http://qt-project.org/doc/qt-4.8/qwidget.html#winId ... Since it's Qt thing I am leaving thread opened... I went through documentation but I could not find how do I get WinID of some external application?
bq. According to your description, do you mean that you have a windows application which is built with QT and you want to use the code above to find it and minimize or maximize it? If my understanding is right, how do you get the HWND for Qt application? As far as I know, in Qt it is WID but in C++ it is HWND.bq.