Class: QgsMessageOutput

class qgis.core.QgsMessageOutput

Bases: sip.wrapper

Interface for showing messages from QGIS in GUI independent way.

This class provides abstraction of a dialog for showing output to the user. By default QgsMessageConsoleOutput will be used if not overridden with other message output creator function.

QGIS application uses QgsMessageView class for displaying a dialog to the user.

Object deletes itself when it’s not needed anymore. Children should use signal destroyed() to notify the deletion

Methods

appendMessage

message to be appended to the current text

createMessageOutput

function that returns new class derived from QgsMessageOutput (don't forget to delete it then if showMessage(bool) is not used showMessage(bool) deletes the instance)

setMessage

Sets message, it won't be displayed until

setTitle

Sets title for the messages

showMessage

display the message to the user and deletes itself

Attributes

MessageHtml

MessageText

MessageHtml = 1
MessageText = 0
class MessageType

Bases: int

appendMessage(self, message: str)

message to be appended to the current text

Parameters:

message (str) –

createMessageOutput() QgsMessageOutput

function that returns new class derived from QgsMessageOutput (don’t forget to delete it then if showMessage(bool) is not used showMessage(bool) deletes the instance)

Return type:

QgsMessageOutput

setMessage(self, message: str, msgType: QgsMessageOutput.MessageType)

Sets message, it won’t be displayed until

Parameters:
setTitle(self, title: str)

Sets title for the messages

Parameters:

title (str) –

showMessage(self, blocking: bool = True)

display the message to the user and deletes itself

showMessage(title: str, message: str, msgType: QgsMessageOutput.MessageType) Display the blocking message to the user.

New in version 2.10.

Parameters:

blocking (bool = True) –