4#include "qplatformdefs.h"
13#if QT_CONFIG(graphicsview)
15#include <QtWidgets/qgraphicsproxywidget.h>
30#if QT_CONFIG(draganddrop)
31#include <private/qdnd_p.h>
33#include "private/qguiapplication_p.h"
36#include "private/qstylesheetstyle_p.h"
37#include "private/qstyle_p.h"
38#if QT_CONFIG(messagebox)
42#include <QtGui/qstylehints.h>
43#include <QtGui/qinputmethod.h>
44#include <QtGui/private/qwindow_p.h>
45#include <QtGui/qpointingdevice.h>
46#include <QtGui/private/qpointingdevice_p.h>
47#include <qpa/qplatformtheme.h>
48#if QT_CONFIG(whatsthis)
49#include <QtWidgets/QWhatsThis>
51#if QT_CONFIG(accessibility)
52#include <QtGui/qaccessible_base.h>
53#include "private/qaccessiblewidgetfactory_p.h"
56#include "private/qkeymapper_p.h"
59#include <private/qthread_p.h>
61#include <QtGui/private/qevent_p.h>
62#include <QtGui/private/qeventpoint_p.h>
63#include <private/qfont_p.h>
65#include <private/qaction_p.h>
74#include "private/qgesturemanager_p.h"
75#include <qpa/qplatformfontdatabase.h>
79#include <qpa/qplatformwindow.h>
81#include <qtwidgets_tracepoints_p.h>
84#include <QtCore/private/qcore_mac_p.h>
94#if QT_CONFIG(messagebox)
104 "#include <qcoreevent.h>"
108Q_TRACE_POINT(qtwidgets, QApplication_notify_exit,
bool consumed,
bool filtered);
111#define CHECK_QAPP_INSTANCE(...) \
112 if (Q_LIKELY(QCoreApplication::instance())) { \
114 qWarning("Must construct a QApplication first."); \
115 return __VA_ARGS__; \
130#ifndef QT_NO_GESTURES
298 return widgetWindow->widget();
315#ifndef QT_NO_STYLE_STYLESHEET
326QWidget *QApplicationPrivate::active_window =
nullptr;
327#if QT_CONFIG(wheelevent)
328QPointer<QWidget> QApplicationPrivate::wheel_widget;
334#ifdef QT_KEYPAD_NAVIGATION
336QWidget *QApplicationPrivate::oldEditFocus =
nullptr;
377 if (*
argv[
i] !=
'-') {
384 if (strcmp(
arg,
"-qdevel") == 0 || strcmp(
arg,
"-qdebug") == 0) {
386#ifndef QT_NO_STYLE_STYLESHEET
387 }
else if (strcmp(
arg,
"-stylesheet") == 0 &&
i <
argc -1) {
390 }
else if (strncmp(
arg,
"-stylesheet=", 12) == 0) {
394 }
else if (
qstrcmp(
arg,
"-widgetcount") == 0) {
468#if defined(Q_OS_MACOS)
488#if QT_CONFIG(accessibility)
497#if QT_CONFIG(tooltip)
500 toolTipPal.setResolveMask(0);
529 qWarning(
"QApplication: invalid style override '%s' passed, ignoring it.\n"
652 return widgetWindow ? widgetWindow->widget() :
nullptr;
668 d->toolTipWakeUp.stop();
669 d->toolTipFallAsleep.stop();
684 w->destroy(
true,
true);
698 app_fonts()->clear();
703#if QT_CONFIG(draganddrop)
708 d->cleanupMultitouch();
713 QApplicationPrivate::active_window =
nullptr;
757 -
QRegion(wpoint.x(), wpoint.y(), 1, 1);
762 if (oldmask.isEmpty())
799 for (
const auto &postedEvent : std::as_const(*postedEvents)) {
802 if (postedEvent.receiver != receiver
803 || !postedEvent.
event
804 || postedEvent.event->type() !=
type) {
811 static_cast<QResizeEvent *
>(postedEvent.event)->m_size =
815 static_cast<QMoveEvent *
>(postedEvent.event)->m_pos =
871#ifndef QT_NO_STYLE_STYLESHEET
883 if (!styleSheetStyle)
886 }
else if (styleSheetStyle) {
887 styleSheetStyle->repolish(
qApp);
907 Q_ASSERT(!
"No style available without QApplication!");
916 for (
const auto &
style : styles) {
927 defaultStyle->setParent(
qApp);
931#ifndef QT_NO_STYLE_STYLESHEET
937 defaultStyle->polish(
qApp);
989#ifndef QT_NO_STYLE_STYLESHEET
993 style->setParent(newStyleSheetStyle);
1022#ifndef QT_NO_STYLE_STYLESHEET
1024 w->setStyleSheet(
w->styleSheet());
1039#ifndef QT_NO_STYLE_STYLESHEET
1041 oldStyleSheetStyle->deref();
1127 if (
w && !widgetPalettes.isEmpty()) {
1128 auto it = widgetPalettes.
constFind(
w->metaObject()->className());
1129 const auto cend = widgetPalettes.constEnd();
1133 if (
w->inherits(
it.key()))
1150 if (
className && !widgetPalettes.isEmpty()) {
1186 auto originalResolveMask =
palette.resolveMask();
1188 polishedPalette.setResolveMask(originalResolveMask);
1218#if QT_CONFIG(graphicsview)
1219 for (
auto scene : std::as_const(scene_list))
1239 static const ThemedWidget themedWidgets[] = {
1257 for (
const auto themedWidget : themedWidgets) {
1300 FontHashConstIt
it =
hash->constFind(metaObj->className());
1301 const FontHashConstIt cend =
hash->constEnd();
1302 while (
it == cend && metaObj != &QWidget::staticMetaObject) {
1303 metaObj = metaObj->superClass();
1304 it =
hash->constFind(metaObj->className());
1324 if (
it !=
hash->constEnd())
1369#if QT_CONFIG(graphicsview)
1371 QList<QGraphicsScene *> &scenes =
qApp->d_func()->scene_list;
1403#if defined(QT_BUILD_INTERNAL)
1414 for (
const QString &style : styles) {
1429 for (
auto *
w :
list) {
1430 windowList.removeOne(
w->windowHandle());
1436 for (
int i = 0;
i < windowList.size(); ++
i)
1456 const auto isTopLevelWidget = [] (
const QWidget *
w) {
1460 std::back_inserter(
list), isTopLevelWidget);
1499#if QT_CONFIG(graphicsview)
1500 if (
focus &&
focus->window()->graphicsProxyWidget())
1528#ifdef QT_KEYPAD_NAVIGATION
1529 if (QApplicationPrivate::keyboardNavigationEnabled()) {
1531 prev->setEditFocus(
false);
1535 QPointer<QWidget> that = prev;
1542 QPointer<QWidget> that =
focus;
1564 return QApplicationPrivate::active_window;
1567#if QT_DEPRECATED_SINCE(6,0)
1581bool QApplicationPrivate::tryCloseAllWidgetWindows(
QWindowList *processedWindows)
1585 if (!
w->isVisible() ||
w->data->is_closing)
1591 processedWindows->append(
window);
1596 for (
auto *
w :
list) {
1603 processedWindows->append(
window);
1629 QApplicationPrivate::tryCloseAllWidgetWindows(&processedWindows);
1643#if QT_CONFIG(messagebox)
1669 switch (e->
type()) {
1677 if (
w->data->is_closing)
1694 for (
auto *
w :
list) {
1697 w->d_func()->setLocale_helper(
QLocale(),
true);
1706 if (te->timerId() ==
d->toolTipWakeUp.timerId()) {
1707 d->toolTipWakeUp.stop();
1708 if (
d->toolTipWidget) {
1714 while (
w && !showToolTip) {
1715 showToolTip =
w->isActiveWindow();
1716 w =
w->parentWidget();
1717 w =
w ?
w->window() :
nullptr;
1723 QStyle *
s =
d->toolTipWidget->style();
1725 d->toolTipFallAsleep.start(sleepDelay,
this);
1729 }
else if (te->timerId() ==
d->toolTipFallAsleep.timerId()) {
1730 d->toolTipFallAsleep.stop();
1734#if QT_CONFIG(whatsthis)
1746 for (
auto *
w :
list) {
1769 for (
auto *
w :
list) {
1770 windowList.removeAll(
w->windowHandle());
1777 for (
int i = 0;
i < windowList.size(); ++
i) {
1802#if QT_DEPRECATED_SINCE(6,5)
1803void QApplication::setActiveWindow(
QWidget* act)
1813 if (QApplicationPrivate::active_window ==
window)
1816#if QT_CONFIG(graphicsview)
1826 if (QApplicationPrivate::active_window) {
1829 for (
auto *
w :
list) {
1830 if (
w->isVisible() &&
w->isActiveWindow())
1831 toBeDeactivated.append(
w);
1834 toBeDeactivated.append(QApplicationPrivate::active_window);
1846 QApplicationPrivate::active_window =
window;
1848 if (QApplicationPrivate::active_window) {
1851 for (
auto *
w :
list) {
1852 if (
w->isVisible() &&
w->isActiveWindow())
1853 toBeActivated.append(
w);
1856 toBeActivated.append(QApplicationPrivate::active_window);
1866 for (
int i = 0;
i < toBeActivated.size(); ++
i) {
1868 QApplication::sendSpontaneousEvent(
w, &windowActivate);
1869 QApplication::sendSpontaneousEvent(
w, &activationChange);
1872 for(
int i = 0;
i < toBeDeactivated.size(); ++
i) {
1874 QApplication::sendSpontaneousEvent(
w, &windowDeactivate);
1875 QApplication::sendSpontaneousEvent(
w, &activationChange);
1882 }
else if (QApplicationPrivate::active_window) {
1883 QWidget *
w = QApplicationPrivate::active_window->focusWidget();
1884 if (
w &&
w->isVisible() )
1892 if (!
w && QApplicationPrivate::active_window->focusPolicy() !=
Qt::NoFocus) {
1894 }
else if (!QApplicationPrivate::active_window->isAncestorOf(
w)) {
1907 while (wnd && !wnd->isTopLevel()) {
1908 QWindow *parent = wnd->parent();
1916 wnd = wnd->parent();
1921 if (tlw->windowHandle() == wnd)
1940 if (focusWindow && focusWidget && focusWindow != focusWidget->
windowHandle()) {
1941 if (
QWidgetWindow *widgetWindow = qobject_cast<QWidgetWindow *>(focusWindow))
1950 if (previous && !qobject_cast<QWidgetWindow *>(previous)) {
1955 if (focusWindow && !qobject_cast<QWidgetWindow *>(focusWindow)) {
1969 bool *wrappingOccurred)
1979 bool seenWindow =
false;
1980 bool focusWidgetAfterWindow =
false;
1981 while (test && test !=
f) {
1989 QWidget *focusProxy = test->d_func()->deepestFocusProxy();
1993 const bool canTakeFocus = (effectiveFocusPolicy(focusProxy ? focusProxy : test)
1994 & focus_flag) == focus_flag;
1995 const bool composites = focusProxy ? (
next ? focusProxy->
isAncestorOf(test)
1998 if (canTakeFocus && !composites
2002 &&
f != focusProxy) {
2005 focusWidgetAfterWindow =
true;
2012 if (wrappingOccurred !=
nullptr)
2013 *wrappingOccurred =
next ? focusWidgetAfterWindow : !focusWidgetAfterWindow;
2041 if (
leave && !sameWindow) {
2044 leaveList.append(
w);
2045 }
while (!
w->isWindow() && (
w =
w->parentWidget()));
2047 if (enter && !sameWindow) {
2050 enterList.append(
w);
2051 }
while (!
w->isWindow() && (
w =
w->parentWidget()));
2057 while (!e->isWindow() && (e = e->parentWidget()))
2060 while (!l->isWindow() && (l = l->parentWidget()))
2064 while (enterDepth > leaveDepth) {
2065 wenter = wenter->parentWidget();
2068 while (leaveDepth > enterDepth) {
2069 wleave = wleave->parentWidget();
2072 while (!wenter->isWindow() && wenter != wleave) {
2073 wenter = wenter->parentWidget();
2074 wleave = wleave->parentWidget();
2077 for (
auto *
w =
leave;
w != wleave;
w =
w->parentWidget())
2078 leaveList.append(
w);
2081 enterList.append(
w);
2085 for (
int i = 0;
i < leaveList.size(); ++
i) {
2086 auto *
w = leaveList.at(
i);
2094 qApp->d_func()->notify_helper(
w, &he);
2098 if (!enterList.isEmpty()) {
2103 const QPointF windowPos = std::as_const(enterList).back()->window()->mapFromGlobal(globalPos);
2104 for (
auto it = enterList.crbegin(),
end = enterList.crend();
it !=
end; ++
it) {
2107 const QPointF localPos =
w->mapFromGlobal(globalPos);
2108 QEnterEvent enterEvent(localPos, windowPos, globalPos);
2114 QMutableEventPoint::setPosition(he.point(0), localPos);
2115 qApp->d_func()->notify_helper(
w, &he);
2127 QWidget *parentOfLeavingCursor =
nullptr;
2128 for (
int i = 0;
i < leaveList.size(); ++
i) {
2129 auto *
w = leaveList.at(
i);
2136 parentOfLeavingCursor =
parent;
2142 if (parentOfLeavingCursor && (!enterOnAlien
2143 || parentOfLeavingCursor->effectiveWinId() != enter->
effectiveWinId())) {
2144#if QT_CONFIG(graphicsview)
2145 if (!parentOfLeavingCursor->window()->graphicsProxyWidget())
2156 QWidget *cursorWidget = enter;
2157 while (!cursorWidget->isWindow() && !cursorWidget->isEnabled())
2163#if QT_CONFIG(graphicsview)
2164 if (cursorWidget->window()->graphicsProxyWidget()) {
2165 QWidgetPrivate::nearestGraphicsProxyWidget(cursorWidget)->
setCursor(cursorWidget->cursor());
2199 QWindow *popupWindow = popupWidget ? popupWidget->windowHandle() :
nullptr;
2228 bool block_event =
false;
2242 if (block_event &&
top &&
top->parentWidget() ==
nullptr)
2245 return !block_event;
2250 return !self->modalWindowList.isEmpty();
2258 Qt::MouseButtons buttons,
QWidget *buttonDown,
2265 && !buttonDown && !mouseGrabber) {
2269 if (alienWidget && alienWidget->internalWinId())
2270 alienWidget =
nullptr;
2272 QWidget *receiver = candidate;
2275 mouseGrabber = (buttonDown && !
isBlockedByModal(buttonDown)) ? buttonDown : alienWidget;
2277 if (mouseGrabber && mouseGrabber != candidate) {
2278 receiver = mouseGrabber;
2291 QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
2292 bool spontaneous,
bool onlyDispatchEnterLeave)
2299 if (alienWidget && !isAlien(alienWidget))
2300 alienWidget =
nullptr;
2302 QPointer<QWidget> receiverGuard = receiver;
2303 QPointer<QWidget> nativeGuard = nativeWidget;
2304 QPointer<QWidget> alienGuard = alienWidget;
2318 if (!graphicsWidget) {
2324 *buttonDown =
nullptr;
2326 }
else if (lastMouseReceiver && widgetUnderMouse) {
2331 if ((alienWidget && alienWidget != lastMouseReceiver)
2332 || (isAlien(lastMouseReceiver) && !alienWidget)) {
2333 if (activePopupWidget) {
2335 dispatchEnterLeave(alienWidget ? alienWidget : nativeWidget, lastMouseReceiver,
event->globalPosition());
2351 if (!onlyDispatchEnterLeave) {
2353 result = QApplication::sendSpontaneousEvent(receiver,
event);
2365 enter = alienGuard ? alienWidget : nativeWidget;
2370 lastMouseReceiver = enter;
2371 }
else if (!wasLeaveAfterRelease) {
2372 if (activePopupWidget) {
2374 lastMouseReceiver = alienGuard ? alienWidget : (nativeGuard ? nativeWidget :
nullptr);
2404 if (mouseGrabber && mouseGrabber !=
widget)
2408 if (tlw->data->in_destructor || tlw->data->is_closing)
2420 QWidget *widgetUnderCursor = tlw->d_func()->childAt_helper(windowPos,
widget->data->in_destructor);
2421 if (!widgetUnderCursor)
2422 widgetUnderCursor = tlw;
2423 QPoint pos = widgetUnderCursor->mapFrom(tlw, windowPos);
2575 qWarning(
"QApplication::notify: Unexpected null receiver");
2592#ifndef QT_NO_GESTURES
2594 if (
d->gestureManager) {
2595 switch (e->
type()) {
2619 if (
d->gestureManager->filterEvent(
static_cast<QWidget *
>(receiver), e))
2625 if (
d->gestureManager->filterEvent(receiver, e))
2634 switch (e->
type()) {
2640 d->closeAllPopups();
2651 d->toolTipFallAsleep.stop();
2654 d->toolTipWakeUp.stop();
2660 switch (e->
type()) {
2663 const int key = keyEvent->
key();
2689 switch (e->
type()) {
2707 QPointer<QObject> pr = receiver;
2713 res =
d->notify_helper(
w, e);
2715 if (
res &&
key->isAccepted())
2717 if (!pr ||
w->isWindow())
2720 w =
w->parentWidget();
2730 QPoint relpos = mouse->position().toPoint();
2734 QApplicationPrivate::giveFocusAccordingToFocusPolicy(
w, e, relpos);
2744 &&
w->rect().contains(relpos)) {
2745 d->toolTipWidget =
w;
2746 d->toolTipPos = relpos;
2747 d->toolTipGlobalPos = mouse->globalPosition().toPoint();
2748 QStyle *
s =
d->toolTipWidget->style();
2750 d->toolTipWakeUp.start(
d->toolTipFallAsleep.isActive() ? 20 : wakeDelay,
this);
2754 bool eventAccepted = mouse->isAccepted();
2756 QPointer<QWidget> pw =
w;
2758 QMouseEvent me(mouse->type(), relpos, mouse->scenePosition(), mouse->globalPosition().toPoint(),
2759 mouse->button(), mouse->buttons(), mouse->modifiers(), mouse->source(),
2760 mouse->pointingDevice());
2765 if (!
w->hasMouseTracking()
2768 d->sendThroughApplicationEventFilters(
w,
w == receiver ? mouse : &me);
2772 res =
d->notify_helper(
w,
w == receiver ? mouse : &me);
2775 eventAccepted = (
w == receiver ? mouse : &me)->isAccepted();
2776 if (
res && eventAccepted)
2781 w =
w->parentWidget();
2784 mouse->setAccepted(eventAccepted);
2790 w =
static_cast<QWidget *
>(receiver);
2791 relpos = mouse->position().toPoint();
2792 QPoint diff = relpos -
w->mapFromGlobal(mouse->globalPosition().toPoint());
2797 QMutableEventPoint::setPosition(he.point(0), relpos);
2798 d->notify_helper(
w, &he);
2803 w =
w->parentWidget();
2807 d->hoverGlobalPos = mouse->globalPosition().toPoint();
2810#if QT_CONFIG(wheelevent)
2814 if (
w->window() != popup)
2818 QWheelEvent* wheel =
static_cast<QWheelEvent*
>(e);
2819 if (!wheel->spontaneous()) {
2825 res =
d->notify_helper(
w, wheel);
2830 QPoint relpos = wheel->position().toPoint();
2853 if (QApplicationPrivate::wheel_widget) {
2855 w = QApplicationPrivate::wheel_widget;
2856 relpos =
w->mapFromGlobal(wheel->globalPosition().toPoint());
2865 QApplicationPrivate::wheel_widget =
nullptr;
2868 QApplicationPrivate::wheel_widget =
w;
2872 if (!QApplicationPrivate::wheel_widget)
2873 QApplicationPrivate::wheel_widget =
w;
2876 QApplicationPrivate::giveFocusAccordingToFocusPolicy(
w, e, relpos);
2881 QWheelEvent we(relpos, wheel->globalPosition(), wheel->pixelDelta(), wheel->angleDelta(), wheel->buttons(),
2882 wheel->modifiers(), phase, wheel->inverted(), wheel->source(), wheel->pointingDevice());
2884 we.setTimestamp(wheel->timestamp());
2889 we.setAccepted(
true);
2890 we.m_spont = wheel->spontaneous() &&
w == receiver;
2891 res =
d->notify_helper(
w, &we);
2892 eventAccepted = we.isAccepted();
2893 if (
res && eventAccepted)
2898 QMutableEventPoint::setPosition(we.point(0), we.position() +
w->pos());
2899 w =
w->parentWidget();
2901 wheel->setAccepted(eventAccepted);
2905#ifndef QT_NO_CONTEXTMENU
2909 bool eventAccepted =
context->isAccepted();
2914 eventAccepted = ((
w == receiver) ?
context : &ce)->isAccepted();
2917 if (
res && eventAccepted)
2923 w =
w->parentWidget();
2925 context->setAccepted(eventAccepted);
2929#if QT_CONFIG(tabletevent)
2933 QTabletEvent *tablet =
static_cast<QTabletEvent*
>(e);
2934 QPointF relpos = tablet->position();
2935 bool eventAccepted = tablet->isAccepted();
2937 QTabletEvent te(tablet->type(), tablet->pointingDevice(), relpos, tablet->globalPosition(),
2938 tablet->pressure(), tablet->xTilt(), tablet->yTilt(),
2939 tablet->tangentialPressure(), tablet->rotation(), tablet->z(),
2940 tablet->modifiers(), tablet->button(), tablet->buttons());
2942 te.setTimestamp(tablet->timestamp());
2943 te.setAccepted(
false);
2944 res =
d->notify_helper(
w,
w == receiver ? tablet : &te);
2945 eventAccepted = ((
w == receiver) ? tablet : &te)->isAccepted();
2947 if (
res && eventAccepted)
2953 w =
w->parentWidget();
2955 tablet->setAccepted(eventAccepted);
2960#if QT_CONFIG(tooltip) || QT_CONFIG(whatsthis)
2966 bool eventAccepted =
help->isAccepted();
2970 res =
d->notify_helper(
w,
w == receiver ?
help : &he);
2972 eventAccepted = (
w == receiver ?
help : &he)->isAccepted();
2973 if (
res && eventAccepted)
2979 w =
w->parentWidget();
2981 help->setAccepted(eventAccepted);
2985#if QT_CONFIG(statustip) || QT_CONFIG(whatsthis)
2989 res =
d->notify_helper(
w, e);
2994 w =
w->parentWidget();
2999#if QT_CONFIG(draganddrop)
3001 QDragEnterEvent *dragEvent =
static_cast<QDragEnterEvent *
>(e);
3002#if QT_CONFIG(graphicsview)
3005 const auto &extra =
w->window()->d_func()->extra;
3006 if (extra && extra->proxyWidget) {
3007 res =
d->notify_helper(
w, dragEvent);
3012 if (
w->isEnabled() &&
w->acceptDrops()) {
3013 res =
d->notify_helper(
w, dragEvent);
3014 if (
res && dragEvent->isAccepted()) {
3021 dragEvent->m_pos =
w->mapToParent(dragEvent->m_pos);
3022 w =
w->parentWidget();
3029#if QT_CONFIG(graphicsview)
3032 const auto &extra =
w->window()->d_func()->extra;
3033 bool isProxyWidget = extra && extra->proxyWidget;
3044 w =
static_cast<QWidget *
>(receiver);
3049 QDropEvent *dragEvent =
static_cast<QDropEvent *
>(e);
3051 while (origReceiver &&
w != origReceiver) {
3052 dragEvent->m_pos = origReceiver->
mapToParent(dragEvent->m_pos);
3053 origReceiver = origReceiver->parentWidget();
3056 res =
d->notify_helper(
w, e);
3058#if QT_CONFIG(graphicsview)
3069 bool eventAccepted = touchEvent->isAccepted();
3074 const QPoint localPos = touchEvent->
points()[0].position().toPoint();
3075 QApplicationPrivate::giveFocusAccordingToFocusPolicy(
w, e, localPos);
3078#ifndef QT_NO_GESTURES
3079 QPointer<QWidget> gesturePendingWidget;
3085 touchEvent->setTarget(
w);
3086 touchEvent->setAccepted(acceptTouchEvents);
3087 QPointer<QWidget>
p =
w;
3088 res = acceptTouchEvents &&
d->notify_helper(
w, touchEvent);
3089 eventAccepted = touchEvent->isAccepted();
3096 touchEvent->m_spont =
false;
3097 if (
res && eventAccepted) {
3099 d->activateImplicitTouchGrab(
w, touchEvent);
3102#ifndef QT_NO_GESTURES
3104 gesturePendingWidget =
w;
3110 w =
w->parentWidget();
3111 touchEvent->setTarget(
w);
3112 for (
int i = 0;
i < touchEvent->pointCount(); ++
i) {
3113 auto &pt = touchEvent->
point(
i);
3114 QMutableEventPoint::setPosition(pt, pt.position() +
offset);
3118#ifndef QT_NO_GESTURES
3119 if (!eventAccepted && !gesturePendingWidget.isNull()) {
3126 touchEvent->setAccepted(eventAccepted);
3135 res =
d->notify_helper(
w, e);
3144#ifndef QT_NO_GESTURES
3148 res =
d->notify_helper(
w, e);
3153 w =
w->parentWidget();
3159 QList<QGesture *> allGestures = gestureEvent->
gestures();
3161 bool eventAccepted = gestureEvent->isAccepted();
3162 bool wasAccepted = eventAccepted;
3165 QList<QGesture *> gestures;
3167 for (
int i = 0;
i < allGestures.size();) {
3176 allGestures.removeAt(
i);
3182 if (!gestures.isEmpty()) {
3184 ge.t = gestureEvent->t;
3185 ge.m_spont = gestureEvent->spontaneous();
3186 ge.m_accept = wasAccepted;
3187 ge.m_accepted = gestureEvent->m_accepted;
3188 res =
d->notify_helper(
w, &ge);
3189 gestureEvent->m_spont =
false;
3190 eventAccepted = ge.isAccepted();
3191 for (
int i = 0;
i < gestures.size(); ++
i) {
3195 if (eventAccepted || ge.isAccepted(
g)) {
3197 gestureEvent->m_targetWidgets[
g->gestureType()] =
w;
3198 gestureEvent->setAccepted(
g,
true);
3202 allGestures.append(
g);
3206 if (allGestures.isEmpty())
3210 w =
w->parentWidget();
3212 for (
QGesture *
g : std::as_const(allGestures))
3213 gestureEvent->setAccepted(
g,
false);
3214 gestureEvent->m_accept =
false;
3220 typedef void (*RegisterTouchWindowFn)(
QWindow *, bool);
3223 RegisterTouchWindowFn registerTouchWindow =
reinterpret_cast<RegisterTouchWindowFn
>
3225 if (registerTouchWindow)
3226 registerTouchWindow(
w->window()->windowHandle(),
true);
3228 res =
d->notify_helper(receiver, e);
3232 RegisterTouchWindowFn registerTouchWindow =
reinterpret_cast<RegisterTouchWindowFn
>
3234 if (registerTouchWindow)
3235 registerTouchWindow(
w->window()->windowHandle(),
false);
3237 res =
d->notify_helper(receiver, e);
3241 res =
d->notify_helper(receiver, e);
3245 res =
d->notify_helper(receiver, e);
3257 Q_TRACE(QApplication_notify_entry, receiver, e, e->
type());
3258 bool consumed =
false;
3259 bool filtered =
false;
3260 Q_TRACE_EXIT(QApplication_notify_exit, consumed, filtered);
3264 && receiver->d_func()->threadData.loadRelaxed()->
thread.loadAcquire() ==
mainThread()
3273#if !defined(QT_NO_CURSOR)
3294 consumed = receiver->
event(e);
3373 auto mousePressPos = devPriv->pointById(0)->eventPoint.globalPressPosition();
3389 if (active_window) {
3390 if (
QWidget *fw = active_window->focusWidget()) {
3439#ifdef QT_KEYPAD_NAVIGATION
3449 QApplicationPrivate::navigationMode =
mode;
3461 return QApplicationPrivate::navigationMode;
3496 for (
QWidget *topLevel : topLevels)
3583#if QT_CONFIG(wheelevent)
3584int QApplication::wheelScrollLines()
3589void QApplication::setWheelScrollLines(
int lines)
3686 return QGuiApplication::sendSpontaneousEvent(receiver,
event);
3693 static QPointer<QWidget> focusedWidgetOnTouchBegin =
nullptr;
3695 switch (
event->type()) {
3700 if (setFocusOnRelease)
3705 if (!setFocusOnRelease)
3721 while (focusWidget) {
3724 && QApplicationPrivate::shouldSetFocus(focusWidget, focusPolicy)) {
3733 if (focusWidget->d_func()->extra && focusWidget->d_func()->extra->focus_proxy)
3734 f = focusWidget->d_func()->extra->focus_proxy;
3740 localPos += focusWidget->
pos();
3748 while (
f->d_func()->extra &&
f->d_func()->extra->focus_proxy)
3749 f =
f->d_func()->extra->focus_proxy;
3760 bool containsPress =
false;
3762 for (
int i = 0;
i < touchEvent->pointCount(); ++
i) {
3763 auto &pt = touchEvent->
point(
i);
3767 containsPress =
true;
3769 return containsPress;
3793 int closestTouchPointId = -1;
3794 QObject *closestTarget =
nullptr;
3795 qreal closestDistance = 0;
3797 for (
auto &epd : devPriv->activePoints.values()) {
3798 const auto &pt = epd.eventPoint;
3799 if (pt.id() != touchPoint.
id()) {
3800 qreal dx = globalPos.
x() - pt.globalPosition().x();
3801 qreal dy = globalPos.
y() - pt.globalPosition().y();
3803 if (closestTouchPointId == -1 ||
distance < closestDistance) {
3804 closestTouchPointId = pt.id();
3810 return static_cast<QWidget *
>(closestTarget);
3822 for (
int i = 0;
i < touchEvent->pointCount(); ++
i) {
3823 auto &ep = touchEvent->
point(
i);
3825 QMutableEventPoint::setTarget(ep,
widget);
3834 typedef QPair<QEventPoint::State, QList<QEventPoint> > StatesAndTouchPoints;
3835 QHash<QWidget *, StatesAndTouchPoints> widgetsNeedingEvents;
3837 const auto *
device = te->pointingDevice();
3838 auto touchPoints = te->points();
3839 for (
auto &touchPoint : touchPoints) {
3841 QPointer<QObject>
target;
3855 target =
window->childAt(
window->mapFromGlobal(touchPoint.globalPosition().toPoint()));
3860 bool usingClosestWidget =
false;
3862 QWidget *closestWidget =
d->findClosestTouchPointTarget(
device, touchPoint);
3867 usingClosestWidget =
true;
3874 QMutableEventPoint::setTarget(touchPoint,
target);
3887 if (touchPoints.count() == 1
3893 StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[targetWidget];
3895 maskAndPoints.second.append(touchPoint);
3898 if (widgetsNeedingEvents.isEmpty())
3901 bool accepted =
false;
3905 const QPointer<QWidget>
widget =
it.key();
3910 switch (
it.value().first) {
3928 touchEvent.setTimestamp(te->timestamp());
3929 touchEvent.setTarget(
widget);
3934 switch (touchEvent.type()) {
3939 bool res = te->spontaneous() ? QApplication::sendSpontaneousEvent(
widget, &touchEvent)
3941 if (
res && touchEvent.isAccepted()) {
3950#ifndef QT_NO_GESTURES
3954 bool res = te->spontaneous() ? QApplication::sendSpontaneousEvent(
widget, &touchEvent)
3956 if (
res && touchEvent.isAccepted())
3971 touchEvent.setTimestamp(timestamp);
3973 QSet<QWidget *> widgetsNeedingCancel;
3975 for (
auto &epd : devPriv->activePoints.values()) {
3976 const auto &pt = epd.eventPoint;
3979 widgetsNeedingCancel.insert(
static_cast<QWidget *
>(
target));
3982 widItEnd = widgetsNeedingCancel.constEnd(); widIt != widItEnd; ++widIt) {
3984 touchEvent.setTarget(
widget);
3985 QApplication::sendSpontaneousEvent(
widget, &touchEvent);
3996#if QT_CONFIG(draganddrop)
3997void QApplicationPrivate::notifyDragStarted(
const QDrag *drag)
3999 QGuiApplicationPrivate::notifyDragStarted(drag);
4009#ifndef QT_NO_GESTURES
4017 return qAppPriv->gestureManager;
4035#include "moc_qapplication.cpp"
IOBluetoothDevice * device
static void(* setWidgetParent)(QObject *, QObject *)
static QWidget * pickMouseReceiver(QWidget *candidate, const QPoint &windowPos, QPoint *pos, QEvent::Type type, Qt::MouseButtons buttons, QWidget *buttonDown, QWidget *alienWidget)
virtual void notifyLayoutDirectionChange() override
static void initializeWidgetPalettesFromTheme()
static QApplicationPrivate * instance()
void handlePaletteChanged(const char *className=nullptr) override
void sendSyntheticEnterLeave(QWidget *widget)
static QWidget * desktop()
static QWidget * focus_widget
static QPointer< QWidget > leaveAfterRelease
QGestureManager * gestureManager
static void initializeWidgetFontHash()
bool notify_helper(QObject *receiver, QEvent *e)
virtual void notifyActiveWindowChange(QWindow *) override
static QWidget * hidden_focus_widget
QPalette basePalette() const override
static void setFocusWidget(QWidget *focus, Qt::FocusReason reason)
void closePopup(QWidget *popup)
static PaletteHash widgetPalettes
static int enabledAnimations
static QWidget * focusNextPrevChild_helper(QWidget *toplevel, bool next, bool *wrappingOccurred=nullptr)
internal Helper function that returns the new focus widget, but does not set the focus reason.
static QString styleSheet
Qt::WindowModality defaultModality() const override
void initializeMultitouch()
QPixmap applyQIconStyleHelper(QIcon::Mode mode, const QPixmap &base) const override
static bool inPopupMode()
static QWindow * windowForWidget(const QWidget *widget)
void initializeMultitouch_sys()
void handleThemeChanged() override
QHash< QByteArray, QPalette > PaletteHash
void openPopup(QWidget *popup)
static QWidgetList * popupWidgets
void activateImplicitTouchGrab(QWidget *widget, QTouchEvent *touchBeginEvent, ImplicitTouchGrabMode grabMode=GrabAcceptedPoints)
void notifyWindowIconChanged() override
QWidget * findClosestTouchPointTarget(const QPointingDevice *device, const QEventPoint &touchPoint)
bool closeAllPopups() override
static void dispatchEnterLeave(QWidget *enter, QWidget *leave, const QPointF &globalPosF)
static QString desktopStyleKey()
static bool isBlockedByModal(QWidget *widget)
static QStyle * app_style
void createEventDispatcher() override
static QWidget * main_widget
static bool translateRawTouchEvent(QWidget *widget, const QTouchEvent *touchEvent)
static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget, QWidget *native, QWidget **buttonDown, QPointer< QWidget > &lastMouseReceiver, bool spontaneous=true, bool onlyDispatchEnterLeave=false)
static void setSystemFont(const QFont &font)
static bool autoSipEnabled
static bool updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent)
static void setActiveWindow(QWidget *act)
static bool tryModalHelper(QWidget *widget, QWidget **rettop=nullptr)
bool windowNeverBlocked(QWindow *window) const override
QApplicationPrivate(int &argc, char **argv)
void initialize()
Initializes the QApplication object, called from the constructors.
static void translateTouchCancel(const QPointingDevice *device, ulong timestamp)
void cleanupMultitouch_sys()
The QApplication class manages the GUI application's control flow and main settings.
static QStyle * style()
Returns the application's style object.
static void setStyle(QStyle *)
Sets the application's GUI style to style.
static void aboutQt()
Displays a simple message box about Qt.
static void closeAllWindows()
Closes all top-level windows.
static void beep()
Sounds the bell, using the default volume and sound.
virtual ~QApplication()
Cleans up any window system resources that were allocated by this application.
static bool isEffectEnabled(Qt::UIEffect)
Returns true if effect is enabled; otherwise returns false.
static void setPalette(const QPalette &, const char *className=nullptr)
Changes the application palette to palette.
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or \nullptr if there is no Qt widget there.
static void alert(QWidget *widget, int duration=0)
static QPalette palette()
Returns the current application palette.
static QWidget * activeModalWidget()
Returns the active modal widget.
static QWidget * topLevelAt(const QPoint &p)
Returns the top-level widget at the given point; returns \nullptr if there is no such widget.
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or \nullptr if no widget in this ap...
static QWidgetList topLevelWidgets()
Returns a list of the top-level widgets (windows) in the application.
static QFont font()
Returns the default application font.
bool autoSipEnabled
toggles automatic SIP (software input panel) visibility
static void setEffectEnabled(Qt::UIEffect, bool enable=true)
Enables the UI effect effect if enable is true, otherwise the effect will not be used.
static QWidget * activePopupWidget()
Returns the active popup widget.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
int startDragTime
the time in milliseconds that a mouse button must be held down before a drag and drop operation will ...
static void setCursorFlashTime(int)
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
\macro qApp
int doubleClickInterval
the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks
int cursorFlashTime
the text cursor's flash (blink) time in milliseconds
static void setStartDragTime(int ms)
int startDragDistance
the minimum distance required for a drag and drop operation to start.
bool event(QEvent *) override
\reimp
void setAutoSipEnabled(const bool enabled)
bool notify(QObject *, QEvent *) override
\reimp
static void setStartDragDistance(int l)
static QWidget * activeWindow()
Returns the application top-level window that has the keyboard input focus, or \nullptr if no applica...
bool compressEvent(QEvent *, QObject *receiver, QPostEventList *) override
int keyboardInputInterval
the time limit in milliseconds that distinguishes a key press from two consecutive key presses
void setStyleSheet(const QString &sheet)
QString styleSheet
the application style sheet
static void setKeyboardInputInterval(int)
static void setFont(const QFont &, const char *className=nullptr)
Changes the default application font to font.
static void setDoubleClickInterval(int)
static QWidgetList allWidgets()
Returns a list of all the widgets in the application.
static QColormap instance(int screen=-1)
static void setEventSpontaneous(QEvent *e, bool spontaneous)
QCoreApplicationPrivate::Type application_type
static bool is_app_closing
bool sendThroughApplicationEventFilters(QObject *, QEvent *)
static bool sendThroughObjectEventFilters(QObject *, QEvent *)
static bool is_app_running
static void checkReceiverThread(QObject *receiver)
static QAbstractEventDispatcher * eventDispatcher
static bool testAttribute(uint flag)
static QThread * mainThread()
static bool threadRequiresCoreApplication()
void * resolveInterface(const char *name, int revision) const
\macro Q_DECLARE_TR_FUNCTIONS(context)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
bool event(QEvent *) override
\reimp
static void setAttribute(Qt::ApplicationAttribute attribute, bool on=true)
Sets the attribute attribute if on is true; otherwise clears the attribute.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
friend class QApplication
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
static QPoint pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
static QDragManager * self()
The QEventPoint class provides information about a point in a QPointerEvent.
QPointF globalPosition
the global position of this point.
int id
the ID number of this event point.
State
Specifies the state of this event point.
bool spontaneous() const
Returns true if the event originated outside the application (a system event); otherwise returns fals...
Type
This enum type defines the valid event types in Qt.
@ ApplicationPaletteChange
@ CloseSoftwareInputPanel
@ ApplicationLayoutDirectionChange
@ ApplicationWindowIconChange
@ RequestSoftwareInputPanel
Type type() const
Returns the event type.
void ignore()
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
The QFocusEvent class contains event parameters for widget focus events.
\reentrant \inmodule QtGui
The QGestureEvent class provides the description of triggered gestures.
QList< QGesture * > gestures() const
Returns all gestures that are delivered in the event.
static bool gesturePending(QObject *o)
static QGestureManager * instance(InstanceCreation ic=ForceCreation)
QGestureManager(QObject *parent)
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Qt::GestureType gestureType
the type of the gesture
static bool obey_desktop_settings
static void updatePalette()
static QPlatformIntegration * platformIntegration()
static QString styleOverride
static void captureGlobalModifierState(QEvent *e)
virtual void handlePaletteChanged(const char *className=nullptr)
static QWindow * focus_window
void createEventDispatcher() override
Called from QCoreApplication::init()
virtual void handleThemeChanged()
static bool sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event)
static QPlatformTheme * platformTheme()
static QPlatformNativeInterface * platformNativeInterface()
static QWindowList topLevelWindows()
Returns a list of the top-level windows in the application.
static QWindow * modalWindow()
Returns the most recently shown modal window.
static QWindow * topLevelAt(const QPoint &pos)
Returns the top level window at the given position pos, if any.
static void setFont(const QFont &)
Changes the default application font to font.
static QPalette palette()
Returns the current application palette.
static void setPalette(const QPalette &pal)
Changes the application palette to pal.
static QFont font()
Returns the default application font.
bool compressEvent(QEvent *, QObject *receiver, QPostEventList *) override
static QStyleHints * styleHints()
Returns the application's style hints.
static QInputMethod * inputMethod()
returns the input method.
static Qt::KeyboardModifiers keyboardModifiers()
Returns the current state of the modifier keys on the keyboard.
bool event(QEvent *) override
\reimp
static bool desktopSettingsAware()
Returns true if Qt is set to use the system's standard colors, fonts, etc.; otherwise returns false.
static int exec()
Enters the main event loop and waits until exit() is called, and then returns the value that was set ...
friend class const_iterator
The QHelpEvent class provides an event that is used to request helpful information about a particular...
Mode
This enum type describes the mode for which a pixmap is intended to be used.
The QKeyEvent class describes a key event.
int count() const
Returns the number of keys involved in this event.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
QString text() const
Returns the Unicode text that this key generated.
bool isAutoRepeat() const
Returns true if this event comes from an auto-repeating key; returns false if it comes from an initia...
int key() const
Returns the code of the key that was pressed or released.
The QLayout class is the base class of geometry managers.
void widgetEvent(QEvent *)
const_iterator ConstIterator
iterator find(const Key &key)
static void aboutQt(QWidget *parent, const QString &title=QString())
Displays a simple message box about Qt, with the given title and centered over parent (if parent is n...
The QMoveEvent class contains event parameters for move events.
const QPoint & pos() const
Returns the new position of the widget.
static QObject * target(const QEventPoint &p)
static QMutableSinglePointEvent * from(QSinglePointEvent *e)
static QMutableTouchEvent * from(QTouchEvent *e)
bool isWindowType() const
Returns true if the object is a window; otherwise returns false.
QObject * parent() const
Returns a pointer to the parent object.
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
QThread * thread() const
Returns the thread in which the object lives.
bool inherits(const char *classname) const
Returns true if this object is an instance of a class that inherits className or a QObject subclass t...
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
The QPalette class contains color groups for each widget state.
static void clear()
Removes all pixmaps from the cache.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
void setTimestamp(quint64 timestamp) override
static QPointingDevicePrivate * get(QPointingDevice *q)
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
static const QPointingDevice * primaryPointingDevice(const QString &seatName=QString())
Returns the primary pointing device (the core pointer, traditionally assumed to be a mouse) on the gi...
\inmodule QtCore\reentrant
bool contains(const QRectF &r) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
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...
The QRegion class specifies a clip region for a painter.
The QResizeEvent class contains event parameters for resize events.
const QSize & size() const
Returns the new size of the widget.
const_iterator ConstIterator
const_iterator constBegin() const noexcept
const_iterator constEnd() const noexcept
const_iterator constFind(const T &value) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
static QStringList keys()
Returns the list of valid keys, i.e.
static QStyle * create(const QString &)
The QStyleOption class stores the parameters used by QStyle functions.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
@ SH_Widget_ShareActivation
@ SH_ToolTip_FallAsleepDelay
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
QEventPoint & point(int touchId)
QMap< int, QEventPoint > points
static QThread * currentThread()
The QTouchEvent class contains parameters that describe a touch event.
const QRegion & region() const
static void enterWhatsThisMode()
This function switches the user interface into "What's This?" mode.
static QWindowPrivate * get(QWindow *window)
QHash< int, QWidget * > hash
[35multi]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
@ NavigationModeKeypadTabOrder
@ WA_TouchPadAcceptSingleTouchEvents
@ WA_TransparentForMouseEvents
@ WA_WState_AcceptedTouchBeginEvent
@ ActiveWindowFocusReason
Q_CORE_EXPORT void qt_call_post_routines()
static int uiEffectToFlag(Qt::UIEffect effect)
bool Q_WIDGETS_EXPORT qt_tab_all_widgets()
static void initResources()
void qt_init_tooltip_palette()
bool qt_replay_popup_mouse_event
static void ungrabMouseForPopup(QWidget *popup)
static void ungrabKeyboardForPopup(QWidget *popup)
FontHash * qt_app_fonts_hash()
bool qt_popup_down_closed
Q_WIDGETS_EXPORT bool qt_tryModalHelper(QWidget *widget, QWidget **rettop)
int qt_antialiasing_threshold
QWidget * qt_desktopWidget
Q_WIDGETS_EXPORT QWidget * qt_button_down
void qRegisterWidgetsVariant()
static void grabForPopup(QWidget *popup)
QPointer< QWidget > qt_last_mouse_receiver
QWidget * qt_tlw_for_window(QWindow *wnd)
Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
bool qt_try_modal(QWidget *widget, QEvent::Type type)
Q_GUI_EXPORT bool qt_is_tty_app
void qt_qpa_set_cursor(QWidget *w, bool force)
#define QByteArrayLiteral(str)
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
void Q_CORE_EXPORT qt_call_post_routines()
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
bool qIsInf(qfloat16 f) noexcept
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
Q_CONSTINIT Q_GUI_EXPORT bool qt_is_tty_app
#define CHECK_QAPP_INSTANCE(...)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei count
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLsizei GLsizei GLfloat distance
GLenum GLuint GLintptr offset
static void initResources()
#define qPrintable(string)
QStyleSheetStyle * qt_styleSheet(QStyle *style)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
#define Q_TRACE_METADATA(provider, metadata)
#define Q_TRACE_PREFIX(provider, prefix)
#define Q_TRACE_EXIT(x,...)
#define Q_TRACE_POINT(provider, tracepoint,...)
#define Q_INIT_RESOURCE(name)
QT_BEGIN_NAMESPACE typedef QHash< WId, QWidget * > QWidgetMapper
QSet< QWidget * > QWidgetSet
QList< QWidget * > QWidgetList
static QPalette toolTipPalette(const QPalette &systemPalette, bool light)
QPointer< QWindow > qt_last_mouse_receiver
Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
const char className[16]
[1]
QTextStream out(stdout)
[7]
QList< QWidget * > widgets
[11]
QGraphicsOpacityEffect * effect
the effect attached to this item