Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickpopup.cpp File Reference

(7b96f2c3a078cd9a0c5084d9f3ea78cd6e988ec9)

#include "qquickpopup_p.h"
#include "qquickpopup_p_p.h"
#include "qquickpopupanchors_p.h"
#include "qquickpopupitem_p_p.h"
#include "qquickpopupwindow_p_p.h"
#include "qquickpopuppositioner_p_p.h"
#include "qquickapplicationwindow_p.h"
#include "qquickoverlay_p_p.h"
#include "qquickcontrol_p_p.h"
#include <QtCore/qloggingcategory.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/qquickitem.h>
#include <QtQuick/private/qquickaccessibleattached_p.h>
#include <QtQuick/private/qquickattachedpropertypropagator_p.h>
#include <QtQuick/private/qquicktransition_p.h>
#include <QtQuick/private/qquickitem_p.h>
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
#include "qquickpopup.moc"
#include "moc_qquickpopup_p.cpp"
Include dependency graph for qquickpopup.cpp:

Go to the source code of this file.

Classes

class  QWindowExposedObserver
struct  ObserverDeleter

Functions

void openPopup (QQuickPopupPrivate *d)
static QQuickItemfindRootOfOverlaySubtree (QQuickItem *source, const QQuickOverlay *overlay)

Variables

static std::unique_ptr< QWindowExposedObserver, ObserverDeleters_windowExposedObserver

Function Documentation

◆ findRootOfOverlaySubtree()

QQuickItem * findRootOfOverlaySubtree ( QQuickItem * source,
const QQuickOverlay * overlay )
static

Definition at line 3295 of file qquickpopup.cpp.

◆ openPopup()

void openPopup ( QQuickPopupPrivate * d)

A popup's position is meant to be relative to its nearest parent item. If this item exists in another window, the position needs to be mapped between the windows. We use mapToGlobal(QPointF) to figure out where to position the popup window. However, if mapToGlobal(QPointF) is called before the parent window is exposed, it will on Windows and X11 assume that the parent windows position is (0,0). This means that the popup window's position will usually be wrong, when it's opened at the same time as the parent window. To work around this issue, we wait for the parent window to be exposed, before opening the popup window.

Definition at line 1113 of file qquickpopup.cpp.

References s_windowExposedObserver.

Variable Documentation

◆ s_windowExposedObserver

std::unique_ptr< QWindowExposedObserver, ObserverDeleter > s_windowExposedObserver
static

Definition at line 1100 of file qquickpopup.cpp.

Referenced by openPopup().