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 열거형 값을 통해 항목 보기 클래스에 대해 지원됩니다.
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.