![]() |
CopperSpice API
2.0.0
|
The QStatusTipEvent class provides an event that is used to show messages in a status bar. More...
Public Methods | |
QStatusTipEvent (const QString &tip) | |
QString | tip () const |
![]() | |
QEvent (const QEvent &other) | |
QEvent (Type type) | |
virtual | ~QEvent () |
void | accept () |
void | ignore () |
bool | isAccepted () const |
QEvent & | operator= (const QEvent &other) |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Type | type () const |
Additional Inherited Members | |
![]() | |
enum | Type |
![]() | |
static int | registerEventType (int hint=-1) |
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() method. They are shown in the status bar when the mouse cursor enters the widget.
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
myWidget->setStatusTip(tr("This is my widget."));
setCentralWidget(myWidget);
}
| ![]() |
Status tips can also be set on actions using the QAction::setStatusTip() function:
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
newAct->setStatusTip(tr("Create a new file."));
fileMenu->addAction(newAct);
// ...
}
| ![]() |
Finally, status tips are supported for the item view classes through the Qt::StatusTipRole enum value.
|
explicit |
Constructs a status tip event with the text specified by tip.
|
inline |
Returns the message to show in the status bar.