Subgroup: Message
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 setMessage
set message, it won’t be displayed until setTitle
set 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
-
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)
-
setMessage
(self, message: str, msgType: QgsMessageOutput.MessageType)¶ set message, it won’t be displayed until
-
setTitle
(self, title: str)¶ set title for the messages
-
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.
-