Notifications - Can I stop the dialog and move them to a widget in the VCP?

More
25 Jan 2022 13:17 #233062 by Donb9261
The dialog is nice but takes far too much real estate. 

It would be nice to know how I could a) stop the dialog from appearing b) use a widget to show the notifications inside the main window and viewable by button press events. 

Kurt,

Is this possible and if so where do I begin? I try not to screw around too much with the original code so as not to break the app. Maybe rewrite the notifications widget and label yours as _old? Or have it pick between the 2 types: dialog or main window based on yaml config?

Open too your expert opinion. And sincerely hope you are doing well. 
The following user(s) said Thank You: KCJ

Please Log in or Create an account to join the conversation.

More
26 Jan 2022 22:16 #233237 by Grotius
Hi,

It would be nice to know how I could a) stop the dialog from appearing

In python add a "#" before the self.dialog pop up ... line.

use a widget to show the notifications inside the main window and viewable by button press events. 

This takes a Python course.
Attached 2 Python files, doing a similar thing. Loading a window and a button. Maybe interesting to study.
 
Attachments:

Please Log in or Create an account to join the conversation.

More
03 Feb 2022 14:10 #233879 by KCJ
Don,

Notifications are implemented as a plugin, so are extremely easy to modify to suit your needs. To disable you can comment out the notifications plugin in the YAML file.

This is the plugin that sends the desktop notifications:
github.com/kcjengr/qtpyvcp/blob/master/q...ins/notifications.py

Here is a widget that displays the notifications in the GUI:
github.com/kcjengr/qtpyvcp/blob/master/q...tification_widget.py

Cheers,
Kurt

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.075 seconds
Powered by Kunena Forum