32 #include <QtWidgets/qwidget.h>
34 #include <qbasictimer.h>
40 ToolTipLabel(
const QString &text,
const QPoint &pos, QWidget *w,
int msecDisplayTime);
43 void adjustTooltipScreen(
const QPoint &pos);
44 void updateSize(
const QPoint &pos);
45 bool eventFilter(QObject *, QEvent *)
override;
46 QBasicTimer hideTimer, expireTimer;
48 void reuseTip(
const QString &text,
int msecDisplayTime,
const QPoint &pos);
50 void hideTipImmediately();
51 void setTipRect(QWidget *w,
const QRect &r);
52 void restartExpireTimer(
int msecDisplayTime);
53 bool tipChanged(
const QPoint &pos,
const QString &text, QObject *o);
54 void placeTip(
const QPoint &pos, QWidget *w,
const QPoint &alternativeTopRightPos = QPoint());
55 static int getTipScreen(
const QPoint &pos, QWidget *w);
57 void timerEvent(QTimerEvent *e)
override;
58 void paintEvent(QPaintEvent *e)
override;
59 void mouseMoveEvent(QMouseEvent *e)
override;
60 void resizeEvent(QResizeEvent *e)
override;
61 #ifndef QT_NO_STYLE_STYLESHEET
66 void styleSheetParentDestroyed() {
67 setProperty(
"_q_stylesheet_parent", QVariant());
71 QWidget *styleSheetParent;
83 static void showText(
const QPoint &pos,
const QString &
text, QWidget *w =
nullptr,
const QPoint &alternativeTopRightPos = QPoint());
84 static void showText(
const QPoint &pos,
const QString &text, QWidget *w,
const QRect &rect);
85 static void showText(
const QPoint &pos,
const QString &text, QWidget *w,
const QRect &rect,
int msecShowTime,
const QPoint &alternativeTopRightPos = QPoint());
86 static inline void hideText() {
showText(QPoint(), QString()); }
88 static QString
text();
92 static void setFont(
const QFont &);