Subgroup: Message

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

Methods

actionEvent
changeEvent
childEvent
closeEvent
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dismiss Dismisses the item, removing it from the message bar and deleting it.
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
duration returns the duration in second of the message
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
getStyleSheet returns the styleSheet
hideEvent
icon Returns the icon for the message.
initPainter
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
level Returns the message level for the message.
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
receivers
resizeEvent
sender
senderSignalIndex
setDuration
setIcon
setLevel
setText
setTitle
setWidget
sharedPainter
showEvent
tabletEvent
text Returns the text for the message.
timerEvent
title Returns the title for the message.
updateMicroFocus
wheelEvent
widget Returns the widget for the message.

Signals

styleChanged emitted when the message level has changed [signal]

Attributes

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

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

returns the styleSheet

hideEvent()
icon(self) → QIcon

Returns the icon for the message.

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

Returns the message level for the message.

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setDuration(self, duration: int) → QgsMessageBarItem
setIcon(self, icon: QIcon) → QgsMessageBarItem
setLevel(self, level: Qgis.MessageLevel) → QgsMessageBarItem
setText(self, text: str) → QgsMessageBarItem
setTitle(self, title: str) → QgsMessageBarItem
setWidget(self, widget: QWidget) → QgsMessageBarItem
sharedPainter()
showEvent()
styleChanged

emitted when the message level has changed [signal]

tabletEvent()
text(self) → str

Returns the text for the message.

timerEvent()
title(self) → str

Returns the title for the message.

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

Returns the widget for the message.