Qt 4.8
|
The QStatusTipEvent class provides an event that is used to show messages in a status bar. More...
#include <qevent.h>
Public Functions | |
QStatusTipEvent (const QString &tip) | |
Constructs a status tip event with the text specified by tip. More... | |
QString | tip () const |
Returns the message to show in the status bar. More... | |
~QStatusTipEvent () | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
Properties | |
QString | s |
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) { myWidget->setStatusTip(tr("This is my widget.")); setCentralWidget(myWidget); } |
Status tips can also be set on actions using the QAction::setStatusTip() function:
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.
QStatusTipEvent::QStatusTipEvent | ( | const QString & | tip | ) |
Constructs a status tip event with the text specified by tip.
Definition at line 3218 of file qevent.cpp.
QStatusTipEvent::~QStatusTipEvent | ( | ) |
Definition at line 3224 of file qevent.cpp.
|
inline |
Returns the message to show in the status bar.
Definition at line 612 of file qevent.h.