|
cut 3.4.1-rc1
|
Banner widget that displays info or error notification messages. More...
Public Member Functions | |
| __init__ (self, parent=None) | |
| Initialize the QeBanner widget. | |
| install_filter_on (self, QObject obj) | |
| Install a ResizeFilter on another widget so the banner matches its size. | |
| onNotificationRemoved (self) | |
| Handle a notification being removed. | |
| push_message (self, message, type, timeout=None) | |
| Add a notification message to the banner. | |
| show_info (self, str message) | |
| Show an informational message that auto-disappears. | |
| show_error (self, str message) | |
| Show an error message that persists until closed. | |
| getQtDesignerPluginInfo (cls) | |
| Provides Qt Designer with widget information. | |
Banner widget that displays info or error notification messages.
The banner can show multiple messages stacked vertically. Info messages auto-disappear after a timeout, while error messages persist until closed. The banner automatically hides when all messages are dismissed.
| qebanner.QeBanner.__init__ | ( | self, | |
| parent = None ) |
Initialize the QeBanner widget.
| parent | The parent widget. |
| qebanner.QeBanner.getQtDesignerPluginInfo | ( | cls | ) |
Provides Qt Designer with widget information.
Return: dict Dictionary with values for keys: icon, module, container, tool_tip and xml.
| qebanner.QeBanner.install_filter_on | ( | self, | |
| QObject | obj ) |
Install a ResizeFilter on another widget so the banner matches its size.
Allows the banner to overlay another widget with the same width, without using a layout.
| obj | The reference widget to monitor resize events on. |
| qebanner.QeBanner.onNotificationRemoved | ( | self | ) |
Handle a notification being removed.
Decrements the message counter and hides the banner when no messages remain. Adjusts scroll bar visibility based on the number of messages.
| qebanner.QeBanner.push_message | ( | self, | |
| message, | |||
| type, | |||
| timeout = None ) |
Add a notification message to the banner.
Shows the banner if hidden, creates a QeNotificationMessage widget, and inserts it at the top of the message stack. A maximum of 3 messages are displayed before a scroll bar appears.
| message | The text message to display. |
| type | The notification type (NotificationType.INFO or NotificationType.ERROR). |
| timeout | Timeout in milliseconds before auto-closing (for Info notifications). |
| qebanner.QeBanner.show_error | ( | self, | |
| str | message ) |
Show an error message that persists until closed.
| message | The error message text. |
| qebanner.QeBanner.show_info | ( | self, | |
| str | message ) |
Show an informational message that auto-disappears.
| message | The informational message text. |