6#include <QtGui/qwindow.h>
7#include <QtGui/private/qguiapplication_p.h>
8#include <qpa/qplatformintegration.h>
12#include <QMdiSubWindow>
14#include <QAbstractScrollArea>
44 if (!
q->isWindow() && (
q->geometry().bottom() <= 0 ||
q->geometry().right() <= 0))
59 if (
window->parent() ==
nullptr)
62 if (
q->internalWinId()) {
67 bool nativeWidgetSet =
false;
72 || qobject_cast<QMdiSubWindow *>(
p) != 0
75 || qobject_cast<QAbstractScrollArea *>(
p) != 0
79 nativeWidgetSet =
true;
82 p =
p->parentWidget();
93 d->extra->hasWindowContainer =
true;
94 p =
p->parentWidget();
182 qWarning(
"QWindowContainer: embedded window cannot be null");
186 d->window = embeddedWindow;
188 QString windowName =
d->window->objectName();
191 d->fakeParent.setObjectName(windowName +
"ContainerFakeParent"_L1);
193 d->window->setParent(&
d->fakeParent);
194 d->window->parent()->installEventFilter(
this);
221 d->window->destroy();
232void QWindowContainer::focusWindowChanged(
QWindow *focusWindow)
235 d->oldFocusWindow = focusWindow;
236 if (focusWindow ==
d->window) {
255 if (ce->
child() ==
d->window) {
256 o->removeEventFilter(
this);
287 d->updateUsesNativeWidgets();
288 if (
d->isStillAnOrphan()) {
289 d->window->parent()->removeEventFilter(
this);
290 d->window->setParent(
d->usesNativeWidgets
293 d->fakeParent.destroy();
294 if (
d->window->parent())
295 d->window->parent()->installEventFilter(
this);
297 if (
d->window->parent()) {
298 d->markParentChain();
303 if (
d->window->parent())
307 if (
d->window->parent()) {
308 if (
d->oldFocusWindow !=
d->window) {
309 d->window->requestActivate();
316#if QT_CONFIG(draganddrop)
321 return e->isAccepted();
353 for (
int i=0;
i<children.
size(); ++
i) {
357 if (wd->
extra && wd->
extra->hasWindowContainer)
366 if (
d->window->parent())
367 d->window->parent()->removeEventFilter(
parent);
368 d->window->setParent(&
d->fakeParent);
369 d->window->parent()->installEventFilter(
parent);
377 if (
d->window->parent()) {
378 d->updateUsesNativeWidgets();
379 d->markParentChain();
387 d->window->parent()->removeEventFilter(
parent);
390 d->fakeParent.destroy();
400 if (
d->window->parent())
409 if (
d->window->parent())
418 if (
d->window->parent())
426#include "moc_qwindowcontainer_p.cpp"
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or \nullptr if no widget in this ap...
QObject * child() const
Returns the child object that was added or removed.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
Type
This enum type defines the valid event types in Qt.
static QPlatformIntegration * platformIntegration()
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void installEventFilter(QObject *filterObj)
Installs an event filter filterObj on this object.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
~QWindowContainerPrivate()
QPointer< QWindow > window
void updateUsesNativeWidgets()
bool isStillAnOrphan() const
static QWindowContainerPrivate * get(QWidget *w)
static void parentWasChanged(QWidget *parent)
bool event(QEvent *ev) override
QWindowContainer(QWindow *embeddedWindow, QWidget *parent=nullptr, Qt::WindowFlags f={ })
static void parentWasRaised(QWidget *parent)
static void parentWasMoved(QWidget *parent)
static void parentWasLowered(QWidget *parent)
QWindow * containedWindow() const
static void toplevelAboutToBeDestroyed(QWidget *parent)
bool eventFilter(QObject *, QEvent *ev) override
void setGeometry(int posx, int posy, int w, int h)
Sets the geometry of the window, excluding its window frame, to a rectangle constructed from posx,...
Combined button and popup list for selecting options.
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
GLfloat GLfloat GLfloat w
[0]
GLdouble GLdouble GLdouble GLdouble q
#define QT_CONFIG(feature)
void(* qwindowcontainer_traverse_callback)(QWidget *parent)
static void qwindowcontainer_traverse(QWidget *parent, qwindowcontainer_traverse_callback callback)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent