QSystemTrayIcon, change behavior
-
Hi,
A tray icon does not necessarily have a contextual menu, it might also just provide some information.
Your situation is not really clear.
What do you want from your system tray icon ?
@SGaist thanks for the quick reply
What do you want from your system tray icon ?
This is the message it shows.
After this message disappears, the icon I set for the tray continues here:
I don't want that.
I can set the visibility to false aftershowMessage()
but then, the message won't stay in the notification area.I hope I made the question clear.
-
So you just want the notification but not the icon ?
-
Then you might have to pilfer the backend code of QSystemTrayIcon since you have no use of it beside the notification part.
-
Then you might have to pilfer the backend code of QSystemTrayIcon since you have no use of it beside the notification part.
-
Then you might have to pilfer the backend code of QSystemTrayIcon since you have no use of it beside the notification part.
Where do I find the code?
In the git repo or e.g. here: https://code.woboq.org/qt5/qtbase/src/widgets/util/qsystemtrayicon.cpp.html
-
In the git repo or e.g. here: https://code.woboq.org/qt5/qtbase/src/widgets/util/qsystemtrayicon.cpp.html
@Christian-Ehrlicher thank you
Is there any step by step on how to build it from source, or in which category here in the forum can I post a question? -
Why do you want to compile Qt5 now?
See https://doc.qt.io/qt-5/build-sources.html -
Why do you want to compile Qt5 now?
See https://doc.qt.io/qt-5/build-sources.html@Christian-Ehrlicher just out of curiosity
-
Then you might have to pilfer the backend code of QSystemTrayIcon since you have no use of it beside the notification part.
-
Why do you want to compile Qt5 now?
See https://doc.qt.io/qt-5/build-sources.html -
@hbatalha said in QSystemTrayIcon, change behavior:
What exactly did you mean by "pilfer the backend "? Should I remove some code?
No, you should get some inspiration from it.
-
@hbatalha said in QSystemTrayIcon, change behavior:
What exactly did you mean by "pilfer the backend "? Should I remove some code?
No, you should get some inspiration from it.
-
You have to do some more spelunking and go to the backend side of things to get the Windows specific implementation.
-
You have to do some more spelunking and go to the backend side of things to get the Windows specific implementation.