QStatusTipEvent Class
La clase QStatusTipEvent proporciona un evento que se utiliza para mostrar mensajes en una barra de estado. Más...
| Cabecera: | #include <QStatusTipEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Hereda: | QEvent |
- Lista de todos los miembros, incluyendo los heredados
- QStatusTipEvent es parte de Clases de Eventos y Sistema de Ayuda.
Funciones Públicas
| QStatusTipEvent(const QString &tip) | |
| QString | tip() const |
Descripción Detallada
Los consejos de estado pueden establecerse en un widget usando la función QWidget::setStatusTip(). Se muestran en la barra de estado cuando el cursor del ratón entra en el widget. Por ejemplo:
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QWidget *myWidget = new QWidget; myWidget->setStatusTip(tr("This is my widget.")); setCentralWidget(myWidget); ... } |
|
Los consejos de estado también pueden establecerse en acciones utilizando la función QAction::setStatusTip():
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); ... } |
|
Por último, los consejos de estado son compatibles con las clases de vista de elementos a través del valor enum Qt::StatusTipRole.
Véase también QStatusBar, QHelpEvent, y QWhatsThisClickedEvent.
Documentación de las funciones miembro
[explicit] QStatusTipEvent::QStatusTipEvent(const QString &tip)
Construye un evento de aviso de estado con el texto especificado por tip.
Véase también tip().
QString QStatusTipEvent::tip() const
Devuelve el mensaje a mostrar en la barra de estado.
Véase también QStatusBar::showMessage().
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

