QStatusTipEvent

PyQt5.QtGui.QStatusTipEvent

Inherits from QEvent.

Description

The QStatusTipEvent class provides an event that is used to show messages in a status bar.

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:

# MainWindow::MainWindow(QWidget *parent)
#     : QMainWindow(parent)
# {
# #! [0]
#     QWidget *myWidget = new QWidget;
#     myWidget->setStatusTip(tr("This is my widget."));

#     setCentralWidget(myWidget);
# }
../../_images/qstatustipevent-widget.png

Status tips can also be set on actions using the QAction::setStatusTip() function:

# MainWindow::MainWindow(QWidget *parent)
#     : QMainWindow(parent)
# {
#     QMenu *fileMenu = menuBar()->addMenu(tr("File"));

#     QAction *newAct = new QAction(tr("&New"), this);
#     newAct->setStatusTip(tr("Create a new file."));
#     fileMenu->addAction(newAct);
# }
../../_images/qstatustipevent-action.png

Finally, status tips are supported for the item view classes through the StatusTipRole enum value.

Methods

__init__(str)

Constructs a status tip event with the text specified by tip.

See also

tip().


__init__(QStatusTipEvent)

TODO


tip() → str

TODO