PySide6.QtGui.QStatusTipEvent¶
- class QStatusTipEvent¶
The
QStatusTipEvent
class provides an event that is used to show messages in a status bar. More…Synopsis¶
Methods¶
def
__init__()
def
tip()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Warning
This section contains snippets that were automatically translated from C++ to Python and may contain errors.
Status tips can be set on a widget using the QWidget::setStatusTip() function. They are shown in the status bar when the mouse cursor enters the widget. For example:
def __init__(self, parent): super().__init__(parent) myWidget = QWidget() myWidget.setStatusTip(tr("This is my widget.")) setCentralWidget(myWidget) ...
Status tips can also be set on actions using the
setStatusTip()
function:def __init__(self, parent): super().__init__(parent) fileMenu = menuBar().addMenu(tr("File")) newAct = QAction(tr("New"), self) newAct.setStatusTip(tr("Create a file().")) fileMenu.addAction(newAct) ...
Finally, status tips are supported for the item view classes through the Qt::StatusTipRole enum value.
See also
- __init__(tip)¶
- Parameters:
tip –
QStatusTipEvent
Constructs a status tip event with the text specified by
tip
.See also
- __init__(tip)
- Parameters:
tip – str
Constructs a status tip event with the text specified by
tip
.See also
- tip()¶
- Return type:
str
Returns the message to show in the status bar.
See also