このページでは

QStatusTipEvent Class

QStatusTipEvent クラスは、ステータスバーにメッセージを表示するために使用されるイベントを提供します。詳細...

ヘッダー: #include <QStatusTipEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
継承元: QEvent

パブリック関数

QStatusTipEvent(const QString &tip)
QString tip() const

プロテクトされた関数

QStatusTipEvent(QStatusTipEvent &&)
QStatusTipEvent &operator=(QStatusTipEvent &&)
QStatusTipEvent &operator=(const QStatusTipEvent &other)

詳細説明

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 列挙型の値を通じて、アイテムビュークラスでもステータスティップがサポートされています。

関連項目: QStatusBar 、QHelpEvent 、およびQWhatsThisClickedEvent 。

メンバ関数のドキュメント

[explicit] QStatusTipEvent::QStatusTipEvent(const QString &tip)

tip で指定されたテキストを含むステータス・ティップ・イベントを作成します。

tip()も参照してください 。

[protected delete] QStatusTipEvent::QStatusTipEvent(QStatusTipEvent &&)

QStatusTipEvent のインスタンスをムーブコンストラクトで生成します。この関数は削除されています。

QString QStatusTipEvent::tip() const

ステータスバーに表示するメッセージを返します。

QStatusBar::showMessage()も参照してください 。

[protected delete] QStatusTipEvent &QStatusTipEvent::operator=(QStatusTipEvent &&)

other をこのQStatusTipEvent インスタンスに割り当てます。この関数は削除されます。

[noexcept protected default] QStatusTipEvent &QStatusTipEvent::operator=(const QStatusTipEvent &other)

other をこのQStatusTipEvent インスタンスにコピーして割り当てます。

© 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.