Class: QgsMessageBarItem

class qgis.gui.QgsMessageBarItem(text: str, level: Qgis.MessageLevel = Qgis.Info, duration: int = 0, parent: QWidget = None)

Bases: PyQt5.QtWidgets.QWidget

make out a widget containing a message to be displayed on the bar

QgsMessageBarItem(title: str, text: str, level: Qgis.MessageLevel = Qgis.Info, duration: int = 0, parent: QWidget = None) make out a widget containing title and message to be displayed on the bar

QgsMessageBarItem(title: str, text: str, widget: QWidget, level: Qgis.MessageLevel = Qgis.Info, duration: int = 0, parent: QWidget = None) make out a widget containing title, message and widget to be displayed on the bar

QgsMessageBarItem(widget: QWidget, level: Qgis.MessageLevel = Qgis.Info, duration: int = 0, parent: QWidget = None) make out a widget containing a widget to be displayed on the bar

Parameters
  • text (str) –

  • level (Qgis.MessageLevel = Qgis.Info) –

  • duration (int = 0) –

  • parent

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dismiss(self)

Dismisses the item, removing it from the message bar and deleting it. Calling this on items which have not been added to a message bar has no effect.

New in version 3.4.

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
duration(self) → int

returns the duration in second of the message

Return type

int

enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
getStyleSheet(self) → str

returns the styleSheet

Return type

str

hideEvent()
icon(self) → QIcon

Returns the icon for the message.

Return type

QIcon

initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
level(self) → Qgis.MessageLevel

Returns the message level for the message.

Return type

Qgis.MessageLevel

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setDuration(self, duration: int) → QgsMessageBarItem
Parameters

duration (int) –

Return type

QgsMessageBarItem

setIcon(self, icon: QIcon) → QgsMessageBarItem
Parameters

icon (QIcon) –

Return type

QgsMessageBarItem

setLevel(self, level: Qgis.MessageLevel) → QgsMessageBarItem
Parameters

level (Qgis.MessageLevel) –

Return type

QgsMessageBarItem

setText(self, text: str) → QgsMessageBarItem
Parameters

text (str) –

Return type

QgsMessageBarItem

setTitle(self, title: str) → QgsMessageBarItem
Parameters

title (str) –

Return type

QgsMessageBarItem

setWidget(self, widget: QWidget) → QgsMessageBarItem
Parameters

widget (QWidget) –

Return type

QgsMessageBarItem

sharedPainter()
showEvent()
styleChanged

emitted when the message level has changed [signal]

Parameters

styleSheet (str) –

tabletEvent()
text(self) → str

Returns the text for the message.

Return type

str

timerEvent()
title(self) → str

Returns the title for the message.

Return type

str

updateMicroFocus()
wheelEvent()
widget(self) → QWidget

Returns the widget for the message.

Return type

QWidget