QStatusTipEvent Class
QStatusTipEventクラスは、ステータスバーにメッセージを表示するためのイベントを提供します。詳細...
ヘッダー | #include <QStatusTipEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
継承: | QEvent |
- 継承メンバを含む全メンバのリスト
- QStatusTipEventはイベントクラスと ヘルプシステムの一部です。
パブリック関数
QStatusTipEvent(const QString &tip) | |
QString | tip() const |
詳しい説明
ステータスチップは、QWidget::setStatusTip() 関数を使用してウィジェットに設定できます。マウスカーソルがウィジェットに入ると、ステータスバーに表示されます。例えば
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QWidget *myWidget = new QWidget; myWidget->setStatusTip(tr("This is my widget.")); setCentralWidget(myWidget); ... } |
ステータスヒントは、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); ... } |
最後に、ステータス・ヒントは、Qt::StatusTipRole enum値を通してアイテム・ビュー・クラスでサポートされます。
QStatusBar 、QHelpEvent 、QWhatsThisClickedEventも参照してください 。
メンバ関数ドキュメント
[explicit]
QStatusTipEvent::QStatusTipEvent(const QString &tip)
tip で指定されたテキストでステータスチップイベントを構築する。
tip()も参照 。
QString QStatusTipEvent::tip() const
ステータス・バーに表示するメッセージを返します。
QStatusBar::showMessage()も参照 。
© 2025 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.