11#include <QtQuick/QQuickWindow>
12#include <QtCore/QCoreApplication>
13#include <QtQml/QQmlEngine>
15#include <private/qguiapplication_p.h>
16#include <private/qqmlengine_p.h>
17#include <private/qv4qobjectwrapper_p.h>
18#include <private/qqmlglobal_p.h>
19#include <qpa/qplatformintegration.h>
36 d->visibleExplicitlySet =
true;
37 if (
d->complete && (!transientParent() || transientParentVisible()))
63 if (
e && !
e->incubationController())
64 e->setIncubationController(incubationController());
80 if (!transientParentAlreadySet && itemParent && !itemParent->
window()) {
81 qCDebug(lcTransient) <<
"window" <<
title() <<
"has invisible Item parent" << itemParent <<
"transientParent"
82 << transientParent() <<
"declared visibility" <<
d->visibility <<
"; delaying show";
83 connect(itemParent, &QQuickItem::windowChanged,
this,
85 }
else if (transientParent() && !transientParent()->
isVisible()) {
89 setWindowVisibility();
107void QQuickWindowQmlImpl::setWindowVisibility()
110 if (transientParent() && !transientParentVisible())
114 disconnect(senderItem, &QQuickItem::windowChanged,
this, &QQuickWindowQmlImpl::setWindowVisibility);
122 if (
d->visibleExplicitlySet && ((
d->visibility == Hidden &&
d->visible) ||
123 (
d->visibility > AutomaticVisibility && !
d->visible))) {
128 error.setObject(
this);
131 while (urlContext && urlContext->url().isEmpty())
132 urlContext = urlContext->parent();
133 error.setUrl(urlContext ? urlContext->url() :
QUrl());
135 QString objectId =
data->context->findObjectId(
this);
138 "Conflicting properties 'visible' and 'visibility' for Window '%1'").
arg(objectId));
141 "Conflicting properties 'visible' and 'visibility'"));
146 if (
d->visibility == AutomaticVisibility) {
162 QWindow::setScreen(screenWrapper ? screenWrapper->
wrappedScreen() :
nullptr);
165bool QQuickWindowQmlImpl::transientParentVisible()
171 return rw && rw->isVisible();
178#include "moc_qquickwindowmodule_p.cpp"
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
static QPlatformIntegration * platformIntegration()
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
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
static QQmlData * get(QObjectPrivate *priv, bool create)
void warning(const QQmlError &)
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlEngine class provides an environment for instantiating QML components.
static void setContextForObject(QObject *, QQmlContext *)
Sets the QQmlContext for the object to context.
The QQmlError class encapsulates a QML error.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QQuickWindow * window() const
Returns the window in which this item is rendered.
static QWindow * renderWindowFor(QQuickWindow *win, QPoint *offset=nullptr)
Returns the real window that win is being rendered to, if any.
QScreen * wrappedScreen() const
static QQuickWindowPrivate * get(QQuickWindow *c)
QQuickWindowQmlImplPrivate()
QWindow::Visibility visibility
void visibleChanged(bool arg)
void classBegin() override
Invoked after class creation, but before any properties have been set.
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void setVisibility(QWindow::Visibility visibility)
void visibilityChanged(QWindow::Visibility visibility)
static QQuickWindowAttached * qmlAttachedProperties(QObject *object)
void setScreen(QObject *screen)
QQuickWindowQmlImpl(QWindow *parent=nullptr)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
QQuickItem * contentItem
\qmlattachedproperty Item Window::contentItem
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool transientParentPropertySet
Qt::WindowFlags flags
the window flags of the window
void visibleChanged(bool arg)
QString title
the window's title in the windowing system
void screenChanged(QScreen *screen)
This signal is emitted when a window's screen changes, either by being set explicitly with setScreen(...
void setVisible(bool visible)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QQmlEngine * qmlEngine(const QObject *obj)
QQuickItem * qmlobject_cast< QQuickItem * >(QObject *object)
myObject disconnect()
[26]
static ReturnedValue wrap(ExecutionEngine *engine, QObject *object)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent