The QStatusTipEvent class provides an event that is used to show messages in a status bar. More...
#include <QStatusTipEvent>
Inherits: QEvent.
QStatusTipEvent ( const QString & tip ) | |
QString | tip () const |
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) { QWidget *myWidget = new QWidget; 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) { QMenu *fileMenu = menuBar()->addMenu(tr("File")); QAction *newAct = new QAction(tr("&New"), this); 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.
See also QStatusBar, QHelpEvent, and QWhatsThisClickedEvent.
Constructs a status tip event with the text specified by tip.
See also tip().
Returns the message to show in the status bar.
See also QStatusBar::showMessage().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.