이 페이지에서

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 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.

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.