| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QTOOLTIP_H |
| 5 | #define QTOOLTIP_H |
| 6 | |
| 7 | #include <QtWidgets/qtwidgetsglobal.h> |
| 8 | #include <QtWidgets/qwidget.h> |
| 9 | |
| 10 | QT_REQUIRE_CONFIG(tooltip); |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | class Q_WIDGETS_EXPORT QToolTip |
| 14 | { |
| 15 | QToolTip() = delete; |
| 16 | public: |
| 17 | static void showText(const QPoint &pos, const QString &text, |
| 18 | QWidget *w = nullptr, const QRect &rect = {}, int msecShowTime = -1); |
| 19 | static inline void hideText() { showText(pos: QPoint(), text: QString()); } |
| 20 | |
| 21 | static bool isVisible(); |
| 22 | static QString text(); |
| 23 | |
| 24 | static QPalette palette(); |
| 25 | static void setPalette(const QPalette &); |
| 26 | static QFont font(); |
| 27 | static void setFont(const QFont &); |
| 28 | }; |
| 29 | |
| 30 | QT_END_NAMESPACE |
| 31 | |
| 32 | #endif // QTOOLTIP_H |
| 33 | |