class orangewidget.utils.messagewidget.MessagesWidget(parent=None, openExternalLinks=False, elideText=False, defaultStyleSheet='', **kwargs)[source]

An iconified multiple message display area.

MessagesWidget displays a short message along with an icon. If there are multiple messages they are summarized. The user can click on the widget to display the full message text in a popup view.


Signal emitted when an embedded html link is clicked (if openExternalLinks is False).


Signal emitted when an embedded html link is hovered.

Information = 1

General informative message.

Warning = 2

A warning message severity.

Error = 3

An error message severity.

sizeHint(self) → QSize[source]
minimumSizeHint(self) → QSize[source]

If True then linkActivated signal will be emitted when the user clicks on an html link in a message, otherwise links are opened using QDesktopServices.openUrl


Set a default css to apply to the rendered text.

Parameters:css (str) – A css style sheet as supported by Qt’s Rich Text support.


Not to be confused with QWidget.styleSheet

Returns:css – The current style sheet
Return type:str
setMessage(message_id, message)[source]

Add a message for message_id to the current display.


Set an empty Message instance to clear the message display but retain the relative ordering in the display should a message for message_id reactivate.


Remove message for message_id from the display.


Setting an empty Message instance will also clear the display, however the relative ordering of the messages will be retained, should the message_id ‘reactivate’.


Set multiple messages in a single call.


Clear all messages.


Return all set messages.

Return type:List[Message]

Summarize all the messages into a single message.

mousePressEvent(self, QMouseEvent)[source]
enterEvent(self, QEvent)[source]
leaveEvent(self, QEvent)[source]
changeEvent(self, QEvent)[source]
paintEvent(self, QPaintEvent)[source]
class orangewidget.utils.messagewidget.Severity[source]

An enum defining a severity level.

Information = 1

General informative message.

Warning = 2

A warning message severity.

Error = 3

An error message severity.

class orangewidget.utils.messagewidget.Message[source]

A stateful message/notification.

  • severity (Severity) – Severity level (default: Severity.Information).
  • icon (QIcon) – Associated icon. If empty the QStyle.standardIcon will be used based on severity.
  • text (str) – Short message text.
  • informativeText (str) – Extra informative text to append to text (space permitting).
  • detailedText (str) – Extra detailed text (e.g. exception traceback)
  • textFormat (Qt.TextFormat) – If Qt.RichText then the contents of text, informativeText and detailedText will be rendered as html instead of plain text.

Alias for Severity

Information = 1

Alias for Severity.Information

Warning = 2

Alias for Severity.Warning

Error = 3

Alias for Severity.Error


Render the message as an HTML fragment.


Is this message instance empty (has no text or icon)


Alias for field number 1