QWindow
QWindow
#include <QWindow>
Public Types
| enum | AncestorMode { ExcludeTransients, IncludeTransients } |
| enum | Visibility { Windowed, Minimized, Maximized, FullScreen, AutomaticVisibility, Hidden } |
Properties
|
- 1 property inherited from QObject
Public Functions
| QWindow(QScreen *targetScreen = nullptr) | |
| QWindow(QWindow *parent) | |
| virtual | ~QWindow() |
| QSize | baseSize() const |
| Qt::ScreenOrientation | contentOrientation() const |
| void | create() |
| QCursor | cursor() const |
| void | destroy() |
| qreal | devicePixelRatio() const |
| QString | filePath() const |
| Qt::WindowFlags | flags() const |
| virtual QObject * | focusObject() const |
| QRect | frameGeometry() const |
| QMargins | frameMargins() const |
| QPoint | framePosition() const |
| QRect | geometry() const |
| int | height() const |
| QIcon | icon() const |
| bool | isActive() const |
| bool | isAncestorOf(const QWindow *child, QWindow::AncestorMode mode = IncludeTransients) const |
| bool | isExposed() const |
| bool | isModal() const |
| bool | isTopLevel() const |
| bool | isVisible() const |
| QPoint | mapFromGlobal(const QPoint &pos) const |
| QPoint | mapToGlobal(const QPoint &pos) const |
| QRegion | mask() const |
| int | maximumHeight() const |
| QSize | maximumSize() const |
| int | maximumWidth() const |
| int | minimumHeight() const |
| QSize | minimumSize() const |
| int | minimumWidth() const |
| Qt::WindowModality | modality() const |
| qreal | opacity() const |
| QWindow * | parent(QWindow::AncestorMode mode) const |
| QWindow * | parent() const |
| QPoint | position() const |
| void | reportContentOrientationChange(Qt::ScreenOrientation orientation) |
| QSurfaceFormat | requestedFormat() const |
| void | resize(const QSize &newSize) |
| void | resize(int w, int h) |
| QScreen * | screen() const |
| void | setBaseSize(const QSize &size) |
| void | setCursor(const QCursor &cursor) |
| void | setFilePath(const QString &filePath) |
| void | setFlag(Qt::WindowType flag, bool on = true) |
| void | setFlags(Qt::WindowFlags flags) |
| void | setFormat(const QSurfaceFormat &format) |
| void | setFramePosition(const QPoint &point) |
| void | setIcon(const QIcon &icon) |
| bool | setKeyboardGrabEnabled(bool grab) |
| void | setMask(const QRegion ®ion) |
| void | setMaximumSize(const QSize &size) |
| void | setMinimumSize(const QSize &size) |
| void | setModality(Qt::WindowModality modality) |
| bool | setMouseGrabEnabled(bool grab) |
| void | setOpacity(qreal level) |
| void | setParent(QWindow *parent) |
| void | setPosition(const QPoint &pt) |
| void | setPosition(int posx, int posy) |
| void | setScreen(QScreen *newScreen) |
| void | setSizeIncrement(const QSize &size) |
| void | setSurfaceType(QSurface::SurfaceType surfaceType) |
| void | setTransientParent(QWindow *parent) |
| void | setVisibility(QWindow::Visibility v) |
| void | setVulkanInstance(QVulkanInstance *instance) |
| void | setWindowState(Qt::WindowState state) |
| void | setWindowStates(Qt::WindowStates state) |
| QSize | sizeIncrement() const |
| QString | title() const |
| QWindow * | transientParent() const |
| Qt::WindowType | type() const |
| void | unsetCursor() |
| QWindow::Visibility | visibility() const |
| QVulkanInstance * | vulkanInstance() const |
| int | width() const |
| WId | winId() const |
| Qt::WindowState | windowState() const |
| Qt::WindowStates | windowStates() const |
| int | x() const |
| int | y() const |
Reimplemented Public Functions
| virtual QSurfaceFormat | format() const override |
| virtual QSize | size() const override |
| virtual QSurface::SurfaceType | surfaceType() const override |
Public Slots
| void | alert(int msec) |
| bool | close() |
| void | hide() |
| void | lower() |
| void | raise() |
| void | requestActivate() |
| void | requestUpdate() |
| void | setGeometry(int posx, int posy, int w, int h) |
| void | setGeometry(const QRect &rect) |
| void | setHeight(int arg) |
| void | setMaximumHeight(int h) |
| void | setMaximumWidth(int w) |
| void | setMinimumHeight(int h) |
| void | setMinimumWidth(int w) |
| void | setTitle(const QString &) |
| void | setVisible(bool visible) |
| void | setWidth(int arg) |
| void | setX(int arg) |
| void | setY(int arg) |
| void | show() |
| void | showFullScreen() |
| void | showMaximized() |
| void | showMinimized() |
| void | showNormal() |
- 1 public slot inherited from QObject
Signals
| void | activeChanged() |
| void | contentOrientationChanged(Qt::ScreenOrientation orientation) |
| void | focusObjectChanged(QObject *object) |
| void | heightChanged(int arg) |
| void | maximumHeightChanged(int arg) |
| void | maximumWidthChanged(int arg) |
| void | minimumHeightChanged(int arg) |
| void | minimumWidthChanged(int arg) |
| void | modalityChanged(Qt::WindowModality modality) |
| void | opacityChanged(qreal opacity) |
| void | screenChanged(QScreen *screen) |
| void | visibilityChanged(QWindow::Visibility visibility) |
| void | visibleChanged(bool arg) |
| void | widthChanged(int arg) |
| void | windowStateChanged(Qt::WindowState windowState) |
| void | windowTitleChanged(const QString &title) |
| void | xChanged(int arg) |
| void | yChanged(int arg) |
- 2 signals inherited from QObject
Static Public Members
| QWindow * | fromWinId(WId id) |
- 10 static public members inherited from QObject
Protected Functions
| virtual void | exposeEvent(QExposeEvent *ev) |
| virtual void | focusInEvent(QFocusEvent *ev) |
| virtual void | focusOutEvent(QFocusEvent *ev) |
| virtual void | hideEvent(QHideEvent *ev) |
| virtual void | keyPressEvent(QKeyEvent *ev) |
| virtual void | keyReleaseEvent(QKeyEvent *ev) |
| virtual void | mouseDoubleClickEvent(QMouseEvent *ev) |
| virtual void | mouseMoveEvent(QMouseEvent *ev) |
| virtual void | mousePressEvent(QMouseEvent *ev) |
| virtual void | mouseReleaseEvent(QMouseEvent *ev) |
| virtual void | moveEvent(QMoveEvent *ev) |
| virtual bool | nativeEvent(const QByteArray &eventType, void *message, long *result) |
| virtual void | resizeEvent(QResizeEvent *ev) |
| virtual void | showEvent(QShowEvent *ev) |
| virtual void | tabletEvent(QTabletEvent *ev) |
| virtual void | touchEvent(QTouchEvent *ev) |
| virtual void | wheelEvent(QWheelEvent *ev) |
Reimplemented Protected Functions
| virtual bool | event(QEvent *ev) override |
- 9 protected functions inherited from QObject
Additional Inherited Members
Detailed Description
The QWindow class represents a window in the underlying windowing system.
A window that is supplied a parent becomes a native child window of their parent window.
An application will typically use QWidget or QQuickView for its UI, and not QWindow directly. Still, it is possible to render directly to a QWindow with QBackingStore or QOpenGLContext, when wanting to keep dependencies to a minimum or when wanting to use OpenGL directly. The Raster Window Example and OpenGL Window Example are useful reference examples for how to render to a QWindow using either approach.
############################
QQ 3087438119

浙公网安备 33010602011771号