6#include <qpa/qplatformwindow.h>
7#include <qpa/qplatformintegration.h>
8#ifndef QT_NO_CONTEXTMENU
9#include <qpa/qplatformtheme.h>
13#include <qpa/qplatformopenglcontext.h>
21#if QT_CONFIG(accessibility)
25#if QT_CONFIG(draganddrop)
29#include <private/qevent_p.h>
31#include <QtCore/QTimer>
32#include <QtCore/QDebug>
35#include <qpa/qplatformcursor.h>
36#include <qpa/qplatformwindow_p.h>
126QWindow::QWindow(
QScreen *targetScreen)
131 d->init(targetScreen);
137 qWarning(
"QWindows cannot be reparented into desktop windows");
224 qFatal(
"Cannot create window: no screens available");
284 return d->visibility;
287void QWindow::setVisibility(Visibility
v)
293 case AutomaticVisibility:
323 if (this->visible !=
visible) {
356 if (!firstWindowTitle.
isEmpty()) {
357 q->setTitle(firstWindowTitle);
364 static bool geometryApplied =
false;
365 if (!geometryApplied) {
366 geometryApplied =
true;
384 && !qobject_cast<QShapedPixmapWindow *>(
q)
435 if (siblingCount == 0)
443 if (currentPosition == targetPosition)
446 siblings.
move(currentPosition, targetPosition);
452 const QScreen *oldScreen =
q->screen();
472 emit q->screenChanged(newScreen);
474 if (
child->isWindowType())
475 static_cast<QWindow *
>(
child)->d_func()->emitScreenChangedRecursion(newScreen);
483 qWarning() <<
q <<
'(' << newScreen <<
"): Attempt to set a screen on a child window.";
494 else if (newScreen && shouldRecreate)
512 q->parent()->create();
516 if (
q->isTopLevel()) {
527 qWarning() <<
"Failed to create platform window for" <<
q <<
"with flags" <<
q->flags();
534 for (
int i = 0;
i < childObjects.
size();
i ++) {
536 if (!
object->isWindowType())
541 childWindow->d_func()->create(recursive);
546 if (childWindow->isVisible())
549 if (
QPlatformWindow *childPlatformWindow = childWindow->d_func()->platformWindow)
550 childPlatformWindow->setParent(
this->platformWindow);
581 const QSize adjustedSize =
583 if (*oldSizeMember == adjustedSize)
585 const bool widthChanged = adjustedSize.
width() != oldSizeMember->
width();
586 const bool heightChanged = adjustedSize.
height() != oldSizeMember->
height();
587 *oldSizeMember = adjustedSize;
617void QWindow::setSurfaceType(SurfaceType surfaceType)
631 return d->surfaceType;
659bool QWindow::isVisible()
const
680void QWindow::create()
696WId QWindow::winId()
const
700 if (!
d->platformWindow)
701 const_cast<QWindow *
>(
this)->create();
703 return d->platformWindow->winId();
719 return d->parentWindow ?
d->parentWindow : (
mode == IncludeTransients ? transientParent() :
nullptr);
741 if (
d->windowRecreationRequired(newScreen)) {
742 qWarning() <<
this <<
'(' <<
parent <<
"): Cannot change screens (" << screen() << newScreen <<
')';
750 d->disconnectFromScreen();
752 d->connectToScreen(newScreen);
760 if (
d->platformWindow) {
773bool QWindow::isTopLevel()
const
776 return d->parentWindow ==
nullptr;
786bool QWindow::isModal()
const
868 return d->requestedFormat;
891 if (
d->platformWindow)
892 return d->platformWindow->format();
893 return d->requestedFormat;
909void QWindow::setFlags(Qt::WindowFlags
flags)
912 if (
d->windowFlags ==
flags)
915 if (
d->platformWindow)
916 d->platformWindow->setWindowFlags(
flags);
923 Qt::WindowFlags
flags =
d->windowFlags;
925 if (
d->platformWindow &&
d->platformWindow->isForeignWindow())
943 setFlags(
d->windowFlags | flag);
945 setFlags(
d->windowFlags & ~flag);
975 bool changed =
false;
976 if (
d->windowTitle !=
title) {
981 d->platformWindow->setWindowTitle(
title);
989 return d->windowTitle;
999void QWindow::setFilePath(
const QString &filePath)
1002 d->windowFilePath = filePath;
1003 if (
d->platformWindow)
1004 d->platformWindow->setWindowFilePath(filePath);
1012QString QWindow::filePath()
const
1015 return d->windowFilePath;
1032 d->windowIcon =
icon;
1033 if (
d->platformWindow)
1034 d->platformWindow->setWindowIcon(icon);
1044QIcon QWindow::icon()
const
1047 if (
d->windowIcon.isNull())
1049 return d->windowIcon;
1063 if (
d->platformWindow)
1064 d->platformWindow->raise();
1078 if (
d->platformWindow)
1079 d->platformWindow->lower();
1103 if (
Q_UNLIKELY(!isVisible() || !
d->platformWindow ||
d->maximumSize ==
d->minimumSize))
1107 const bool isCorner =
1113 if (
Q_UNLIKELY(!isSingleEdge && !isCorner)) {
1114 qWarning() <<
"Invalid edges" << edges <<
"passed to QWindow::startSystemResize, ignoring.";
1118 return d->platformWindow->startSystemResize(edges);
1141 if (
Q_UNLIKELY(!isVisible() || !
d->platformWindow))
1144 return d->platformWindow->startSystemMove();
1167 if (
d->platformWindow) {
1168 d->platformWindow->setOpacity(
level);
1189void QWindow::setMask(
const QRegion ®ion)
1192 if (
d->platformWindow)
1214void QWindow::requestActivate()
1218 qWarning() <<
"requestActivate() called for " <<
this <<
" which has Qt::WindowDoesNotAcceptFocus set.";
1221 if (
d->platformWindow)
1222 d->platformWindow->requestActivateWindow();
1236bool QWindow::isExposed()
const
1262bool QWindow::isActive()
const
1265 if (!
d->platformWindow)
1278 return p->isActive();
1280 return isAncestorOf(
focus);
1305 if (
d->contentOrientation == orientation)
1307 if (
d->platformWindow)
1308 d->platformWindow->handleContentOrientationChange(orientation);
1309 d->contentOrientation = orientation;
1316 return d->contentOrientation;
1331qreal QWindow::devicePixelRatio()
const
1334 return d->devicePixelRatio;
1382 setWindowStates(
state);
1401void QWindow::setWindowStates(Qt::WindowStates
state)
1405 qWarning(
"QWindow::setWindowStates does not accept Qt::WindowActive");
1409 if (
d->platformWindow)
1410 d->platformWindow->setWindowState(
state);
1415 if (newEffectiveState != originalEffectiveState)
1418 d->updateVisibility();
1443Qt::WindowStates QWindow::windowStates()
const
1446 return d->windowState;
1479 qWarning() <<
"transient parent" <<
parent <<
"cannot be same as window";
1489QWindow *QWindow::transientParent()
const
1492 return d->transientParent.data();
1504 q->setTransientParent(
parent);
1524 if (
child->parent() ==
this || (
mode == IncludeTransients &&
child->transientParent() ==
this))
1543QSize QWindow::minimumSize()
const
1546 return d->minimumSize;
1554QSize QWindow::maximumSize()
const
1557 return d->maximumSize;
1565QSize QWindow::baseSize()
const
1576QSize QWindow::sizeIncrement()
const
1579 return d->sizeIncrement;
1589void QWindow::setMinimumSize(
const QSize &
size)
1593 &
d->minimumSize,
size, [
this,
d]() { emit minimumWidthChanged(d->minimumSize.width()); },
1594 [
this,
d]() { emit minimumHeightChanged(d->minimumSize.height()); });
1607 d->positionAutomatic =
false;
1620 d->positionAutomatic =
false;
1668void QWindow::setMaximumSize(
const QSize &
size)
1672 &
d->maximumSize,
size, [
this,
d]() { emit maximumWidthChanged(d->maximumSize.width()); },
1673 [
this,
d]() { emit maximumHeightChanged(d->maximumSize.height()); });
1702void QWindow::setBaseSize(
const QSize &
size)
1705 if (
d->baseSize ==
size)
1708 if (
d->platformWindow && isTopLevel())
1709 d->platformWindow->propagateSizeHints();
1726void QWindow::setSizeIncrement(
const QSize &
size)
1729 if (
d->sizeIncrement ==
size)
1731 d->sizeIncrement =
size;
1732 if (
d->platformWindow && isTopLevel())
1733 d->platformWindow->propagateSizeHints();
1759 d->positionAutomatic =
false;
1760 const QRect oldRect = geometry();
1761 if (
rect == oldRect)
1765 if (
d->platformWindow) {
1767 if (newScreen && isTopLevel())
1768 d->setTopLevelScreen(newScreen,
true);
1773 if (
rect.x() != oldRect.
x())
1775 if (
rect.y() != oldRect.
y())
1793 QScreen *currentScreen =
q->screen();
1794 QScreen *fallback = currentScreen;
1796 if (!
q->parent() && currentScreen && !currentScreen->
geometry().
contains(center)) {
1816QRect QWindow::geometry()
const
1819 if (
d->platformWindow) {
1820 const auto nativeGeometry =
d->platformWindow->geometry();
1831QMargins QWindow::frameMargins()
const
1834 if (
d->platformWindow)
1846QRect QWindow::frameGeometry()
const
1849 if (
d->platformWindow) {
1863QPoint QWindow::framePosition()
const
1866 if (
d->platformWindow) {
1870 return d->geometry.topLeft();
1880void QWindow::setFramePosition(
const QPoint &point)
1884 d->positionAutomatic =
false;
1885 if (
d->platformWindow) {
1888 d->geometry.moveTopLeft(point);
1906void QWindow::setPosition(
const QPoint &pt)
1918void QWindow::setPosition(
int posx,
int posy)
1949void QWindow::resize(
int w,
int h)
1959void QWindow::resize(
const QSize &newSize)
1963 if (
d->platformWindow) {
1964 d->platformWindow->setGeometry(
1967 const QSize oldSize =
d->geometry.size();
1968 d->geometry.setSize(newSize);
1981void QWindow::destroy()
1984 if (!
d->platformWindow)
1987 if (
d->platformWindow->isForeignWindow())
2000 for (
int i = 0;
i < childrenWindows.
size();
i++) {
2002 if (
object->isWindowType()) {
2008 bool wasVisible =
q->isVisible();
2054 return d->platformWindow;
2065 return d->platformWindow;
2078bool QWindow::setKeyboardGrabEnabled(
bool grab)
2081 if (
d->platformWindow)
2082 return d->platformWindow->setKeyboardGrabEnabled(grab);
2095bool QWindow::setMouseGrabEnabled(
bool grab)
2098 if (
d->platformWindow)
2099 return d->platformWindow->setMouseGrabEnabled(grab);
2110QScreen *QWindow::screen()
const
2113 return d->parentWindow ?
d->parentWindow->screen() :
d->topLevelScreen.data();
2129void QWindow::setScreen(
QScreen *newScreen)
2134 d->setTopLevelScreen(newScreen, newScreen !=
nullptr);
2170 return const_cast<QWindow *
>(
this);
2247#if !defined Q_OS_QNX
2286 if (!
d->platformWindow)
2293 bool success =
d->platformWindow->close();
2304 if (!
q->isTopLevel())
2315 if (
q->transientParent())
2324 return q->isVisible();
2435 switch (ev->
type()) {
2477#if QT_CONFIG(accessibility)
2479 state.active =
true;
2480 QAccessibleStateChangeEvent
event(
this,
state);
2481 QAccessible::updateAccessibility(&
event);
2487#if QT_CONFIG(accessibility)
2489 state.active =
true;
2490 QAccessibleStateChangeEvent
event(
this,
state);
2491 QAccessible::updateAccessibility(&
event);
2495#if QT_CONFIG(wheelevent)
2497 wheelEvent(
static_cast<QWheelEvent*
>(ev));
2504 const bool wasVisible =
d->treatAsVisible();
2505 const bool participatesInLastWindowClosed =
d->participatesInLastWindowClosed();
2514 if (wasVisible && participatesInLastWindowClosed)
2541#if QT_CONFIG(tabletevent)
2545 tabletEvent(
static_cast<QTabletEvent *
>(ev));
2564#ifndef QT_NO_CONTEXTMENU
2582 auto asMouseEvent = [](
QEvent *ev) {
2583 const auto t = ev->
type();
2590 me->globalPosition().toPoint(), me->modifiers());
2624void QWindow::requestUpdate()
2627 "QWindow",
"Updates can only be scheduled from the GUI (main) thread");
2630 if (
d->updateRequestPending || !
d->platformWindow)
2632 d->updateRequestPending =
true;
2633 d->platformWindow->requestUpdate();
2718#if QT_CONFIG(wheelevent)
2722void QWindow::wheelEvent(QWheelEvent *ev)
2736#if QT_CONFIG(tabletevent)
2743void QWindow::tabletEvent(QTabletEvent *ev)
2780 if (
d->platformWindow
2781 && (
d->platformWindow->isForeignWindow() ||
d->platformWindow->isEmbedded())) {
2786 return pos +
d->globalPosition();
2796 QPointF nativeGlobalPos = nativeLocalPos + nativeWindowGlobalPos;
2798 return deviceIndependentGlobalPos;
2822 if (
d->platformWindow
2823 && (
d->platformWindow->isForeignWindow() ||
d->platformWindow->isEmbedded())) {
2828 return pos -
d->globalPosition();
2834 QPointF nativeLocalPos = nativeGlobalPos - nativeWindowGlobalPos;
2836 return deviceIndependentLocalPos;
2851 for (
const QWindow *
p =
q->parent();
p;
p =
p->parent()) {
2907QWindow *QWindow::fromWinId(WId
id)
2910 qWarning(
"QWindow::fromWinId(): platform plugin does not support foreign windows.");
2936void QWindow::alert(
int msec)
2939 if (!
d->platformWindow ||
d->platformWindow->isAlertState() || isActive())
2941 d->platformWindow->setAlertState(
true);
2942 if (
d->platformWindow->isAlertState() && msec)
2976 d->setCursor(&cursor);
2982void QWindow::unsetCursor()
2985 d->setCursor(
nullptr);
2993QCursor QWindow::cursor()
const
3035 platformCursor->changeCursor(
c,
q);
3043void *QWindow::resolveInterface(
const char *
name,
int revision)
const
3047 auto *platformWindow =
handle();
3052#if defined(Q_OS_WIN)
3060#if defined(Q_OS_MACOS)
3064#if defined(Q_OS_UNIX)
3068#if defined(Q_OS_WASM)
3075#ifndef QT_NO_DEBUG_STREAM
3082 if (!
window->objectName().isEmpty())
3084 if (
debug.verbosity() > 2) {
3087 debug <<
", visible";
3089 debug <<
", exposed";
3091 <<
", type=" <<
window->type() <<
", flags=" <<
window->flags()
3092 <<
", surface type=" <<
window->surfaceType();
3093 if (
window->isTopLevel())
3094 debug <<
", toplevel";
3099 debug <<
", margins=" << margins;
3100 debug <<
", devicePixelRatio=" <<
window->devicePixelRatio();
3108 debug <<
"QWindow(0x0)";
3114#if QT_CONFIG(vulkan) || defined(Q_QDOC)
3124 d->vulkanInstance = instance;
3133 return d->vulkanInstance;
3140#include "moc_qwindow.cpp"
The QCloseEvent class contains parameters that describe a close event.
static bool is_app_closing
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static void removePostedEvents(QObject *receiver, int eventType=0)
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
The QCursor class provides a mouse cursor with an arbitrary shape.
Qt::CursorShape shape() const
Returns the cursor shape identifier.
Type
This enum type defines the valid event types in Qt.
@ ApplicationWindowIconChange
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 QExposeEvent class contains event parameters for expose events. \inmodule QtGui.
The QFocusEvent class contains event parameters for widget focus events.
void maybeLastWindowClosed()
static void updateBlockedStatus(QWindow *window)
static QWindow * currentMousePressWindow
static void showModalWindow(QWindow *window)
static void hideModalWindow(QWindow *window)
static QPlatformIntegration * platformIntegration()
static QWindowList window_list
static QList< TabletPointData > tabletDevicePoints
static QGuiApplicationPrivate * instance()
static QWindow * currentMouseWindow
static QWindow * focus_window
QWindowList modalWindowList
static void applyWindowGeometrySpecificationTo(QWindow *window)
static QPlatformTheme * platformTheme()
static QWindow * modalWindow()
Returns the most recently shown modal window.
QScreen * primaryScreen
the primary (or default) screen of the application.
static QCursor * overrideCursor()
Returns the active application override cursor.
static QWindow * focusWindow()
Returns the QWindow that receives events tied to focus, such as key events.
QIcon windowIcon
the default window icon
The QHideEvent class provides an event which is sent after a widget is hidden.
static qreal factor(C *context)
The QIcon class provides scalable icons in different modes and states.
bool isNull() const
Returns true if the icon is empty; otherwise returns false.
The QKeyEvent class describes a key event.
qsizetype size() const noexcept
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
void move(qsizetype from, qsizetype to)
qsizetype removeAll(const AT &t)
void prepend(rvalue_ref t)
constexpr bool isNull() const noexcept
Returns true if all margins are is 0; otherwise returns false.
constexpr int left() const noexcept
Returns the left margin.
constexpr int top() const noexcept
Returns the top margin.
The QMoveEvent class contains event parameters for move events.
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...
void setParent(QObject *parent)
Makes the object a child of parent.
QThread * thread() const
Returns the thread in which the object lives.
static QOpenGLContext * currentContext()
Returns the last context which called makeCurrent in the current thread, or \nullptr,...
The QPaintEvent class contains event parameters for paint events.
\inmodule QtCore\reentrant
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
bool intersects(const QRect &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel...
constexpr int height() const noexcept
Returns the height of the rectangle.
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...
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
The QRegion class specifies a clip region for a painter.
The QResizeEvent class contains event parameters for resize events.
The QScreen class is used to query screen properties. \inmodule QtGui.
qreal devicePixelRatio
the screen's ratio between physical pixels and device-independent pixels
QList< QScreen * > virtualSiblings() const
Get the screen's virtual siblings.
QRect geometry
the screen's geometry in pixels
QString name
a user presentable string representing the screen
QPlatformScreen * handle() const
Get the platform screen handle.
The QShowEvent class provides an event that is sent when a widget is shown.
constexpr QSize boundedTo(const QSize &) const noexcept
Returns a size holding the minimum width and height of this size and the given otherSize.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
virtual QPlatformSurface * surfaceHandle() const =0
Returns a handle to the platform-specific implementation of the surface.
SurfaceType
The SurfaceType enum describes what type of surface this is.
static QThread * currentThread()
bool singleShot
whether the timer is a single-shot timer
The QTouchEvent class contains parameters that describe a touch event.
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
bool windowRecreationRequired(QScreen *newScreen) const
QWindow * topLevelWindow(QWindow::AncestorMode mode=QWindow::IncludeTransients) const
QPointer< QScreen > topLevelScreen
void disconnectFromScreen()
QScreen * screenForGeometry(const QRect &rect) const
virtual void clearFocusObject()
QPlatformWindow * platformWindow
virtual void setVisible(bool visible)
void emitScreenChangedRecursion(QScreen *newScreen)
bool updateRequestPending
~QWindowPrivate() override
void create(bool recursive, WId nativeHandle=0)
QPoint globalPosition() const
void updateSiblingPosition(SiblingPosition)
void setCursor(const QCursor *c=nullptr)
void setTopLevelScreen(QScreen *newScreen, bool recreate)
QWindow::Visibility visibility
void setMinOrMaxSize(QSize *oldSizeMember, const QSize &size, qxp::function_ref< void()> funcWidthChanged, qxp::function_ref< void()> funcHeightChanged)
void connectToScreen(QScreen *topLevelScreen)
Qt::WindowStates windowState
bool transientParentPropertySet
virtual QRectF closestAcceptableGeometry(const QRectF &rect) const
static Qt::WindowState effectiveState(Qt::WindowStates)
virtual bool treatAsVisible() const
QSurfaceFormat requestedFormat
void init(QScreen *targetScreen=nullptr)
void updateDevicePixelRatio()
virtual bool participatesInLastWindowClosed() const
void setTransientParent(QWindow *parent)
friend Q_GUI_EXPORT QWindowPrivate * qt_window_private(QWindow *window)
void showNormal()
Shows the window as normal, i.e.
int minimumHeight
the minimum height of the window's geometry
virtual QAccessibleInterface * accessibleRoot() const
Returns the accessibility interface for the object that the window represents.
virtual void moveEvent(QMoveEvent *)
Override this to handle window move events (ev).
int x
the x position of the window's geometry
void windowStateChanged(Qt::WindowState windowState)
This signal is emitted when the windowState changes, either by being set explicitly with setWindowSta...
void heightChanged(int arg)
int maximumWidth
the maximum width of the window's geometry
void showFullScreen()
Shows the window as fullscreen.
virtual bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
Override this to handle platform dependent events.
int width
the width of the window's geometry
bool startSystemMove()
Start a system-specific move operation.
void showMinimized()
Shows the window as minimized.
void modalityChanged(Qt::WindowModality modality)
This signal is emitted when the Qwindow::modality property changes to modality.
virtual void closeEvent(QCloseEvent *)
Override this to handle close events (ev).
void show()
Shows the window.
void setMaximumHeight(int h)
virtual void mousePressEvent(QMouseEvent *)
Override this to handle mouse press events (ev).
void hide()
Hides the window.
void setMinimumHeight(int h)
virtual void focusInEvent(QFocusEvent *)
Override this to handle focus in events (ev).
Qt::WindowFlags flags
the window flags of the window
void contentOrientationChanged(Qt::ScreenOrientation orientation)
virtual void keyPressEvent(QKeyEvent *)
Override this to handle key press events (ev).
QSurfaceFormat format() const override
Returns the actual format of this window.
virtual void mouseMoveEvent(QMouseEvent *)
Override this to handle mouse move events (ev).
SurfaceType surfaceType() const override
Returns the surface type of the window.
Qt::ScreenOrientation contentOrientation
the orientation of the window's contents
void setTitle(const QString &)
bool visible
whether the window is visible or not
void raise()
Raise the window in the windowing system.
virtual void exposeEvent(QExposeEvent *)
The expose event (ev) is sent by the window system when a window moves between the un-exposed and exp...
int maximumHeight
the maximum height of the window's geometry
void setMaximumWidth(int w)
void showMaximized()
Shows the window as maximized.
void setMinimumWidth(int w)
QSize size() const override
Returns the size of the window excluding any window frame.
virtual bool event(QEvent *) override
Override this to handle any event (ev) sent to the window.
virtual void mouseReleaseEvent(QMouseEvent *)
Override this to handle mouse release events (ev).
int y
the y position of the window's geometry
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,...
int minimumWidth
the minimum width of the window's geometry
virtual QObject * focusObject() const
Returns the QObject that will be the final receiver of events tied focus, such as key events.
virtual void hideEvent(QHideEvent *)
Override this to handle hide events (ev).
virtual void mouseDoubleClickEvent(QMouseEvent *)
Override this to handle mouse double click events (ev).
bool close()
Close the window.
virtual void keyReleaseEvent(QKeyEvent *)
Override this to handle key release events (ev).
QString title
the window's title in the windowing system
Visibility visibility
the screen-occupation state of the window
bool startSystemResize(Qt::Edges edges)
Start a system-specific resize operation.
virtual void touchEvent(QTouchEvent *)
Override this to handle touch events (ev).
virtual void paintEvent(QPaintEvent *)
The paint event (ev) is sent by the window system whenever an area of the window needs a repaint,...
virtual void resizeEvent(QResizeEvent *)
Override this to handle resize events (ev).
virtual void focusOutEvent(QFocusEvent *)
Override this to handle focus out events (ev).
void widthChanged(int arg)
virtual void showEvent(QShowEvent *)
Override this to handle show events (ev).
Qt::WindowModality modality
the modality of the window
void setVisible(bool visible)
int height
the height of the window's geometry
void lower()
Lower the window in the windowing system.
qreal opacity
The opacity of the window in the windowing system.
[Window class with invokable method]
T toNativeLocalPosition(const T &value, const C *context)
T toNativeGlobalPosition(const T &value, const C *context)
T fromNativeLocalPosition(const T &value, const C *context)
T fromNativeGlobalPosition(const T &value, const C *context)
T fromNativePixels(const T &value, const C *context)
QRegion toNativeLocalRegion(const QRegion &pointRegion, const QWindow *window)
T toNativeWindowGeometry(const T &value, const C *context)
T fromNativeWindowGeometry(const T &value, const C *context)
Combined button and popup list for selecting options.
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
QTextStream & noforcesign(QTextStream &stream)
Calls QTextStream::setNumberFlags(QTextStream::numberFlags() & ~QTextStream::ForceSign) on stream and...
QTextStream & dec(QTextStream &stream)
Calls QTextStream::setIntegerBase(10) on stream and returns stream.
QTextStream & forcesign(QTextStream &stream)
Calls QTextStream::setNumberFlags(QTextStream::numberFlags() | QTextStream::ForceSign) on stream and ...
@ WindowDoesNotAcceptFocus
#define QT_NATIVE_INTERFACE_RETURN_IF(NativeInterface, baseType)
n void setPosition(void) \n\
GLsizei const GLfloat * v
[13]
GLuint64 GLenum void * handle
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * message
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLdouble GLdouble GLdouble GLdouble q
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define Q_ASSERT_X(cond, x, msg)
#define QT_CONFIG(feature)
Q_GUI_EXPORT QWindowPrivate * qt_window_private(QWindow *window)
QDebug operator<<(QDebug debug, const QWindow *window)
static QWindow * nonDesktopParent(QWindow *parent)
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent