Hi All,
How to display my dialog box as a system tray popup. Does qt provides any specific api's to make dialog as a popup of SystemTray?
Thanks.
Hi All,
How to display my dialog box as a system tray popup. Does qt provides any specific api's to make dialog as a popup of SystemTray?
Thanks.
Hey there,
im not sure what do you mean by dialog box as a system tray popup, if you want your dialog Ui to appear on a specific event ,
just connect the dialog's open or exec slot (depending on your need ) to whatever signal your waiting for to invoke the dialog, you can set the model to true to prevent interactions with other windows.
if you want to just show a warning or information or anything like a small message , you can use QMessageBox , it has some really nice features.
you can also look at this link , it might be helpful http://qt-project.org/forums/viewthread/6785
Hope this helps.
Last edited by toufic.dbouk; 22nd September 2013 at 18:05.
For instance, there is an app called "abc". It has system tray icon. "abc" application has to show notifications in some scenarios. There notifications are like tooltip windows on windows. But, for "abc" application, it has to show rich gui window as a system tray notification. I cannot use QMessageBox for this purpose. This rich gui window should be prompted at notification position.
If I run through my application, the position is always center of desktop. The position should change to default system notification position.
This is what I am looking for. Thanks toufic.
I am not sure that i know what your exactly talking about.
But if you mean that you want your application to show a notification at the system tray and then by pressing the information message or box it will open the your rich GUI window take a look at this : System Tray Icon Example.
implement your rich GUI window and a dialog add all your GUI interfaces and accessibility and then connect it with the system tray information message.( maybe on click message show your window ).
some pics would explain it more if you still want to clarify your idea.
cant you just create and show the dialog when the notification is needed ? and try to change the position as needed, then when your function is done clean it upOriginally Posted by dpn
example :
Good Luck.Qt Code:
connect(this,SIGNAL(emitNotification(/*implement it*/)),mDialog,SLOT(showDialog(/*implement it*/)));To copy to clipboard, switch view to plain text mode
Yes. QSystemTrayIcon::showMessage(). I want to replace this default notification with my own dialog. I need showMessage() geometry in overridden function.
Last edited by dpn; 23rd September 2013 at 06:27.
i guess you answered your self here.
you have to create your own pop up widget and center it as you want.
Also try to catch the event that is causing the balloon information message to show , and instead of showing the balloon , directly show your GUI Window.
i am not sure of the logic behind what you want , i wouldn't say it is flexible and at ease to pop out a whole rich GUI window out of a sudden for the user.
i would have showed the balloon message and then upon clicking it, show the window you want.
i hope this helps , you can always wait for responses from more experienced developers. we both can learn something new every minute.
Bookmarks