cut 3.4.1-rc1
Loading...
Searching...
No Matches
qebanner.QeBanner Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

qebanner.QeBanner.__init__ ( self,
parent = None )

Initialize the QeBanner widget.

Parameters
parentThe parent widget.

Member Function Documentation

◆ getQtDesignerPluginInfo()

qebanner.QeBanner.getQtDesignerPluginInfo ( cls)

Provides Qt Designer with widget information.

Return: dict Dictionary with values for keys: icon, module, container, tool_tip and xml.

◆ install_filter_on()

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.

Parameters
objThe reference widget to monitor resize events on.

◆ onNotificationRemoved()

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.

◆ push_message()

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.

Parameters
messageThe text message to display.
typeThe notification type (NotificationType.INFO or NotificationType.ERROR).
timeoutTimeout in milliseconds before auto-closing (for Info notifications).

◆ show_error()

qebanner.QeBanner.show_error ( self,
str message )

Show an error message that persists until closed.

Parameters
messageThe error message text.

◆ show_info()

qebanner.QeBanner.show_info ( self,
str message )

Show an informational message that auto-disappears.

Parameters
messageThe informational message text.

The documentation for this class was generated from the following file: