Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qtooltip.cpp
Go to the documentation of this file.
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#include <QtWidgets/private/qtwidgetsglobal_p.h>
5
6#include <qapplication.h>
7#include <qevent.h>
8#include <qpointer.h>
9#include <qstyle.h>
10#include <qstyleoption.h>
11#include <qstylepainter.h>
12#include <qtimer.h>
13#if QT_CONFIG(effects)
14#include <private/qeffects_p.h>
15#endif
16#include <qtextdocument.h>
17#include <qdebug.h>
18#include <qpa/qplatformscreen.h>
19#include <qpa/qplatformcursor.h>
20#include <private/qstylesheetstyle_p.h>
21
22#include <qlabel.h>
23#include <QtWidgets/private/qlabel_p.h>
24#include <QtGui/private/qhighdpiscaling_p.h>
25#include <qtooltip.h>
26
28
29using namespace Qt::StringLiterals;
30
81class QTipLabel : public QLabel
82{
84public:
85 QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime);
86 ~QTipLabel();
88
90 void updateSize(const QPoint &pos);
91
92 bool eventFilter(QObject *, QEvent *) override;
93
95
97
98 void reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos);
99 void hideTip();
100 void hideTipImmediately();
101 void setTipRect(QWidget *w, const QRect &r);
102 void restartExpireTimer(int msecDisplayTime);
103 bool tipChanged(const QPoint &pos, const QString &text, QObject *o);
104 void placeTip(const QPoint &pos, QWidget *w);
105
106 static QScreen *getTipScreen(const QPoint &pos, QWidget *w);
107protected:
108 void timerEvent(QTimerEvent *e) override;
109 void paintEvent(QPaintEvent *e) override;
110 void mouseMoveEvent(QMouseEvent *e) override;
111 void resizeEvent(QResizeEvent *e) override;
112
113#ifndef QT_NO_STYLE_STYLESHEET
114public slots:
119 setProperty("_q_stylesheet_parent", QVariant());
120 styleSheetParent = nullptr;
121 }
122
123private:
124 QWidget *styleSheetParent;
125#endif
126
127private:
128 QWidget *widget;
129 QRect rect;
130};
131
133
134QTipLabel::QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime)
135 : QLabel(w, Qt::ToolTip | Qt::BypassGraphicsProxyWidget)
136#ifndef QT_NO_STYLE_STYLESHEET
137 , styleSheetParent(nullptr)
138#endif
139 , widget(nullptr)
140{
141 delete instance;
142 instance = this;
147 setMargin(1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this));
150 setIndent(1);
151 qApp->installEventFilter(this);
152 setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0);
153 setMouseTracking(true);
154 fadingOut = false;
155 reuseTip(text, msecDisplayTime, pos);
156}
157
158void QTipLabel::restartExpireTimer(int msecDisplayTime)
159{
160 Q_D(const QLabel);
161 const qsizetype textLength = d->needTextControl() ? d->control->toPlainText().size() : text().size();
162 qsizetype time = 10000 + 40 * qMax(0, textLength - 100);
163 if (msecDisplayTime > 0)
164 time = msecDisplayTime;
165 expireTimer.start(time, this);
166 hideTimer.stop();
167}
168
169void QTipLabel::reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos)
170{
171#ifndef QT_NO_STYLE_STYLESHEET
172 if (styleSheetParent){
173 disconnect(styleSheetParent, SIGNAL(destroyed()),
175 styleSheetParent = nullptr;
176 }
177#endif
178
179 setText(text);
181 restartExpireTimer(msecDisplayTime);
182}
183
185{
186 d_func()->setScreenForPoint(pos);
187 // Ensure that we get correct sizeHints by placing this window on the right screen.
188 QFontMetrics fm(font());
189 QSize extra(1, 0);
190 // Make it look good with the default ToolTip font on Mac, which has a small descent.
191 if (fm.descent() == 2 && fm.ascent() >= 11)
192 ++extra.rheight();
194 QSize sh = sizeHint();
195 const QScreen *screen = getTipScreen(pos, this);
196 if (!wordWrap() && sh.width() > screen->geometry().width()) {
197 setWordWrap(true);
198 sh = sizeHint();
199 }
200 resize(sh + extra);
201}
202
204{
205 QStylePainter p(this);
207 opt.initFrom(this);
208 p.drawPrimitive(QStyle::PE_PanelTipLabel, opt);
209 p.end();
210
212}
213
215{
216 QStyleHintReturnMask frameMask;
218 option.initFrom(this);
219 if (style()->styleHint(QStyle::SH_ToolTip_Mask, &option, this, &frameMask))
220 setMask(frameMask.region);
221
223}
224
226{
227 if (!rect.isNull()) {
228 QPoint pos = e->globalPosition().toPoint();
229 if (widget)
230 pos = widget->mapFromGlobal(pos);
231 if (!rect.contains(pos))
232 hideTip();
233 }
235}
236
238{
239 instance = nullptr;
240}
241
243{
244 if (!hideTimer.isActive())
245 hideTimer.start(300, this);
246}
247
249{
250 close(); // to trigger QEvent::Close which stops the animation
251 deleteLater();
252}
253
255{
256 if (Q_UNLIKELY(!r.isNull() && !w)) {
257 qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
258 return;
259 }
260 widget = w;
261 rect = r;
262}
263
265{
266 if (e->timerId() == hideTimer.timerId()
267 || e->timerId() == expireTimer.timerId()){
268 hideTimer.stop();
271 }
272}
273
275{
276 switch (e->type()) {
277#ifdef Q_OS_MACOS
278 case QEvent::KeyPress:
279 case QEvent::KeyRelease: {
280 const int key = static_cast<QKeyEvent *>(e)->key();
281 // Anything except key modifiers or caps-lock, etc.
282 if (key < Qt::Key_Shift || key > Qt::Key_ScrollLock)
284 break;
285 }
286#endif
287 case QEvent::Leave:
288 hideTip();
289 break;
290
291
292#if defined (Q_OS_QNX) || defined (Q_OS_WASM) // On QNX the window activate and focus events are delayed and will appear
293 // after the window is shown.
295 case QEvent::FocusIn:
296 return false;
298 if (o != this)
299 return false;
301 break;
302 case QEvent::FocusOut:
303 if (reinterpret_cast<QWindow*>(o) != windowHandle())
304 return false;
306 break;
307#else
310 case QEvent::FocusIn:
311 case QEvent::FocusOut:
312#endif
316 case QEvent::Wheel:
318 break;
319
321 if (o == widget && !rect.isNull() && !rect.contains(static_cast<QMouseEvent*>(e)->position().toPoint()))
322 hideTip();
323 default:
324 break;
325 }
326 return false;
327}
328
330{
331 QScreen *guess = w ? w->screen() : QGuiApplication::primaryScreen();
332 QScreen *exact = guess->virtualSiblingAt(pos);
333 return exact ? exact : guess;
334}
335
337{
338#ifndef QT_NO_STYLE_STYLESHEET
339 if (testAttribute(Qt::WA_StyleSheet) || (w && qt_styleSheet(w->style()))) {
340 //the stylesheet need to know the real parent
341 QTipLabel::instance->setProperty("_q_stylesheet_parent", QVariant::fromValue(w));
342 //we force the style to be the QStyleSheetStyle, and force to clear the cache as well.
344
345 // Set up for cleaning up this later...
346 QTipLabel::instance->styleSheetParent = w;
347 if (w) {
350 // QTBUG-64550: A font inherited by the style sheet might change the size,
351 // particular on Windows, where the tip is not parented on a window.
353 }
354 }
355#endif //QT_NO_STYLE_STYLESHEET
356
357 QPoint p = pos;
358 const QScreen *screen = getTipScreen(pos, w);
359 // a QScreen's handle *should* never be null, so this is a bit paranoid
360 if (const QPlatformScreen *platformScreen = screen ? screen->handle() : nullptr) {
361 QPlatformCursor *cursor = platformScreen->cursor();
362 // default implementation of QPlatformCursor::size() returns QSize(16, 16)
363 const QSize nativeSize = cursor ? cursor->size() : QSize(16, 16);
364 const QSize cursorSize = QHighDpi::fromNativePixels(nativeSize,
365 platformScreen);
366 QPoint offset(2, cursorSize.height());
367 // assuming an arrow shape, we can just move to the side for very large cursors
368 if (cursorSize.height() > 2 * this->height())
369 offset = QPoint(cursorSize.width() / 2, 0);
370
371 p += offset;
372
373 QRect screenRect = screen->geometry();
374 if (p.x() + this->width() > screenRect.x() + screenRect.width())
375 p.rx() -= 4 + this->width();
376 if (p.y() + this->height() > screenRect.y() + screenRect.height())
377 p.ry() -= 24 + this->height();
378 if (p.y() < screenRect.y())
379 p.setY(screenRect.y());
380 if (p.x() + this->width() > screenRect.x() + screenRect.width())
381 p.setX(screenRect.x() + screenRect.width() - this->width());
382 if (p.x() < screenRect.x())
383 p.setX(screenRect.x());
384 if (p.y() + this->height() > screenRect.y() + screenRect.height())
385 p.setY(screenRect.y() + screenRect.height() - this->height());
386 }
387 this->move(p);
388}
389
391{
392 if (QTipLabel::instance->text() != text)
393 return true;
394
395 if (o != widget)
396 return true;
397
398 if (!rect.isNull())
399 return !rect.contains(pos);
400 else
401 return false;
402}
403
427void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecDisplayTime)
428{
429 if (QTipLabel::instance && QTipLabel::instance->isVisible()) { // a tip does already exist
430 if (text.isEmpty()){ // empty text means hide current tip
432 return;
433 } else if (!QTipLabel::instance->fadingOut) {
434 // If the tip has changed, reuse the one
435 // that is showing (removes flickering)
436 QPoint localPos = pos;
437 if (w)
438 localPos = w->mapFromGlobal(pos);
439 if (QTipLabel::instance->tipChanged(localPos, text, w)){
440 QTipLabel::instance->reuseTip(text, msecDisplayTime, pos);
443 }
444 return;
445 }
446 }
447
448 if (!text.isEmpty()) { // no tip can be reused, create new tip:
449 QWidget *tipLabelParent = [w]() -> QWidget* {
450#ifdef Q_OS_WIN32
451 // On windows, we can't use the widget as parent otherwise the window will be
452 // raised when the tooltip will be shown
453 Q_UNUSED(w);
454 return nullptr;
455#else
456 return w;
457#endif
458 }();
459 new QTipLabel(text, pos, tipLabelParent, msecDisplayTime); // sets QTipLabel::instance to itself
463 QTipLabel::instance->setObjectName("qtooltip_label"_L1);
464
465#if QT_CONFIG(effects)
470 else
472#else
474#endif
475 }
476}
477
497{
498 return (QTipLabel::instance != nullptr && QTipLabel::instance->isVisible());
499}
500
508{
510 return QTipLabel::instance->text();
511 return QString();
512}
513
514
515Q_GLOBAL_STATIC(QPalette, tooltip_palette)
516
517
524{
525 return *tooltip_palette();
526}
527
534{
535 return QApplication::font("QTipLabel");
536}
537
547{
548 *tooltip_palette() = palette;
551}
552
559{
560 QApplication::setFont(font, "QTipLabel");
561}
562
564
565#include "qtooltip.moc"
static bool isEffectEnabled(Qt::UIEffect)
Returns true if effect is enabled; otherwise returns false.
static QFont font()
Returns the default application font.
static void setFont(const QFont &, const char *className=nullptr)
Changes the default application font to font.
\inmodule QtCore
Definition qbasictimer.h:18
void start(int msec, QObject *obj)
\obsolete Use chrono overload instead.
int timerId() const noexcept
Returns the timer's ID.
Definition qbasictimer.h:35
void stop()
Stops the timer.
bool isActive() const noexcept
Returns true if the timer is running and has not been stopped; otherwise returns false.
Definition qbasictimer.h:34
\inmodule QtCore
Definition qcoreevent.h:45
@ FocusOut
Definition qcoreevent.h:67
@ KeyRelease
Definition qcoreevent.h:65
@ MouseMove
Definition qcoreevent.h:63
@ KeyPress
Definition qcoreevent.h:64
@ FocusIn
Definition qcoreevent.h:66
@ MouseButtonPress
Definition qcoreevent.h:60
@ WindowActivate
Definition qcoreevent.h:83
@ MouseButtonDblClick
Definition qcoreevent.h:62
@ WindowDeactivate
Definition qcoreevent.h:84
@ MouseButtonRelease
Definition qcoreevent.h:61
\reentrant \inmodule QtGui
int descent() const
Returns the descent of the font.
int ascent() const
Returns the ascent of the font.
\reentrant
Definition qfont.h:20
void setFrameStyle(int)
Sets the frame style to style.
Definition qframe.cpp:300
@ NoFrame
Definition qframe.h:39
QScreen * primaryScreen
the primary (or default) screen of the application.
The QKeyEvent class describes a key event.
Definition qevent.h:423
The QLabel widget provides a text or image display.
Definition qlabel.h:20
void setText(const QString &)
Definition qlabel.cpp:263
void setMargin(int)
Definition qlabel.cpp:541
void paintEvent(QPaintEvent *) override
\reimp
Definition qlabel.cpp:1001
void setIndent(int)
Definition qlabel.cpp:510
void setAlignment(Qt::Alignment)
Definition qlabel.cpp:442
void setWordWrap(bool on)
Definition qlabel.cpp:472
bool wordWrap
the label's word-wrapping policy
Definition qlabel.h:27
QString text
the label's text
Definition qlabel.h:22
void mouseMoveEvent(QMouseEvent *ev) override
\reimp
Definition qlabel.cpp:867
QSize sizeHint() const override
\reimp
Definition qlabel.cpp:820
\inmodule QtGui
Definition qevent.h:195
\inmodule QtCore
Definition qobject.h:90
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
Definition qobject.h:114
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
void deleteLater()
\threadsafe
Definition qobject.cpp:2352
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:485
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
@ ToolTipBase
Definition qpalette.h:56
@ ToolTipText
Definition qpalette.h:56
The QPlatformCursor class provides information about pointer device events (movement,...
The QPlatformScreen class provides an abstraction for visual displays.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
Definition qpoint.h:394
\inmodule QtCore\reentrant
Definition qpoint.h:23
constexpr int y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:132
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr int height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:238
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
Definition qrect.h:163
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qrect.cpp:851
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:184
constexpr int width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:235
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:187
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:547
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
QRect geometry
the screen's geometry in pixels
Definition qscreen.h:45
QScreen * virtualSiblingAt(QPoint point)
Returns the screen at point within the set of \l QScreen::virtualSiblings(), or nullptr if outside of...
Definition qscreen.cpp:629
QPlatformScreen * handle() const
Get the platform screen handle.
Definition qscreen.cpp:83
QPointF position() const
Returns the position of the point in this event, relative to the widget or item that received the eve...
Definition qevent.h:118
\inmodule QtCore
Definition qsize.h:25
constexpr int height() const noexcept
Returns the height.
Definition qsize.h:132
constexpr int width() const noexcept
Returns the width.
Definition qsize.h:129
constexpr int & rheight() noexcept
Returns a reference to the height.
Definition qsize.h:156
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
qsizetype size() const
Returns the number of characters in this string.
Definition qstring.h:182
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:1083
The QStyleHintReturnMask class provides style hints that return a QRegion.
\variable QStyleOptionFocusRect::backgroundColor
The QStyleOption class stores the parameters used by QStyle functions.
void initFrom(const QWidget *w)
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
@ SH_ToolTipLabel_Opacity
Definition qstyle.h:629
@ SH_ToolTip_Mask
Definition qstyle.h:658
@ PM_ToolTipLabelFrameWidth
Definition qstyle.h:499
@ PE_PanelTipLabel
Definition qstyle.h:143
\inmodule QtCore
Definition qcoreevent.h:359
void reuseTip(const QString &text, int msecDisplayTime, const QPoint &pos)
Definition qtooltip.cpp:169
void restartExpireTimer(int msecDisplayTime)
Definition qtooltip.cpp:158
void hideTip()
Definition qtooltip.cpp:242
void resizeEvent(QResizeEvent *e) override
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
Definition qtooltip.cpp:214
void mouseMoveEvent(QMouseEvent *e) override
\reimp
Definition qtooltip.cpp:225
void styleSheetParentDestroyed()
Definition qtooltip.cpp:118
void hideTipImmediately()
Definition qtooltip.cpp:248
bool tipChanged(const QPoint &pos, const QString &text, QObject *o)
Definition qtooltip.cpp:390
void setTipRect(QWidget *w, const QRect &r)
Definition qtooltip.cpp:254
bool fadingOut
Definition qtooltip.cpp:96
QBasicTimer expireTimer
Definition qtooltip.cpp:94
void paintEvent(QPaintEvent *e) override
\reimp
Definition qtooltip.cpp:203
QBasicTimer hideTimer
Definition qtooltip.cpp:94
void timerEvent(QTimerEvent *e) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
Definition qtooltip.cpp:264
void placeTip(const QPoint &pos, QWidget *w)
Definition qtooltip.cpp:336
QTipLabel(const QString &text, const QPoint &pos, QWidget *w, int msecDisplayTime)
Definition qtooltip.cpp:134
static QScreen * getTipScreen(const QPoint &pos, QWidget *w)
Definition qtooltip.cpp:329
static QTipLabel * instance
Definition qtooltip.cpp:87
bool eventFilter(QObject *, QEvent *) override
Filters events if this object has been installed as an event filter for the watched object.
Definition qtooltip.cpp:274
void adjustTooltipScreen(const QPoint &pos)
void updateSize(const QPoint &pos)
Definition qtooltip.cpp:184
The QToolTip class provides tool tips (balloon help) for any widget.
Definition qtooltip.h:14
static QPalette palette()
Returns the palette used to render tooltips.
Definition qtooltip.cpp:523
static bool isVisible()
Definition qtooltip.cpp:496
static QFont font()
Definition qtooltip.cpp:533
static QString text()
Definition qtooltip.cpp:507
static void setFont(const QFont &)
Definition qtooltip.cpp:558
static void showText(const QPoint &pos, const QString &text, QWidget *w=nullptr, const QRect &rect={}, int msecShowTime=-1)
Shows text as a tool tip, with the global position pos as the point of interest.
Definition qtooltip.cpp:427
static void setPalette(const QPalette &)
Definition qtooltip.cpp:546
\inmodule QtCore
Definition qvariant.h:64
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:531
bool setScreen(QScreen *screen)
Definition qwidget.cpp:2427
static QWidgetPrivate * get(QWidget *w)
Definition qwidget_p.h:211
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void setBackgroundRole(QPalette::ColorRole)
Sets the background role of the widget to role.
Definition qwidget.cpp:4398
void setMask(const QBitmap &)
Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible.
void setWindowOpacity(qreal level)
void setPalette(const QPalette &)
Definition qwidget.cpp:4537
int width
the width of the widget excluding any window frame
Definition qwidget.h:114
void setMouseTracking(bool enable)
Definition qwidget.h:853
QPoint pos
the position of the widget within its parent widget
Definition qwidget.h:111
bool close()
Closes this widget.
Definition qwidget.cpp:8608
void move(int x, int y)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qwidget.h:880
int height
the height of the widget excluding any window frame
Definition qwidget.h:115
void ensurePolished() const
Ensures that the widget and its children have been polished by QStyle (i.e., have a proper font and p...
QWindow * windowHandle() const
If this is a native widget, return the associated QWindow.
Definition qwidget.cpp:2490
QStyle * style() const
Definition qwidget.cpp:2607
QFont font
the font currently set for the widget
Definition qwidget.h:133
void resize(int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qwidget.h:883
virtual void resizeEvent(QResizeEvent *event)
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
Definition qwidget.cpp:9868
QCursor cursor
the cursor shape for this widget
Definition qwidget.h:135
QScreen * screen() const
Returns the screen the widget is on.
Definition qwidget.cpp:2503
void showNormal()
Restores the widget after it has been maximized or minimized.
Definition qwidget.cpp:3067
void setForegroundRole(QPalette::ColorRole)
Sets the foreground role of the widget to role.
Definition qwidget.cpp:4463
void setStyleSheet(const QString &styleSheet)
Definition qwidget.cpp:2562
QPointF mapFromGlobal(const QPointF &) const
Translates the global screen coordinate pos to widget coordinates.
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition qwidget.h:910
\inmodule QtGui
Definition qwindow.h:63
#define this
Definition dialogs.cpp:9
QOpenGLWidget * widget
[1]
QString text
object setProperty("down", true)
double e
rect
[4]
QStyleOptionButton opt
T fromNativePixels(const T &value, const C *context)
Combined button and popup list for selecting options.
@ AlignLeft
Definition qnamespace.h:143
@ WA_StyleSheet
Definition qnamespace.h:371
@ UI_AnimateTooltip
@ UI_FadeTooltip
@ Key_ScrollLock
Definition qnamespace.h:684
Q_GUI_EXPORT bool mightBeRichText(const QString &)
Returns true if the string text is likely to be rich text; otherwise returns false.
#define Q_UNLIKELY(x)
#define qApp
void qScrollEffect(QWidget *w, QEffects::DirFlags orient, int time)
Definition qeffects.cpp:524
void qFadeEffect(QWidget *w, int time)
Definition qeffects.cpp:546
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
#define qWarning
Definition qlogging.h:162
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
#define SLOT(a)
Definition qobjectdefs.h:51
#define SIGNAL(a)
Definition qobjectdefs.h:52
GLuint64 key
GLfloat GLfloat GLfloat w
[0]
GLboolean r
[2]
GLenum GLuint GLintptr offset
GLfloat GLfloat p
[1]
GLuint GLenum option
QStyleSheetStyle * qt_styleSheet(QStyle *style)
#define Q_OBJECT
#define slots
#define Q_UNUSED(x)
ptrdiff_t qsizetype
Definition qtypes.h:70
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
QObject::connect nullptr
myObject disconnect()
[26]