QStatusTipEvent Class Reference
|
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().
| Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.5.2 |
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |