Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QWindow Class

The QWindow class represents a window in the underlying windowing system. More...

 #include <QWindow>

Inherits: QObject and QSurface.

Inherited by: QGLMockView, QGLView, and QQuickCanvas.

This class was introduced in Qt 5.0.

Public Types

enum AncestorMode { ExcludeTransients, IncludeTransients }
enum SurfaceClass { Window }
enum SurfaceType { RasterSurface, OpenGLSurface }

Properties

  • 1 property inherited from QObject

Public Functions

QWindow(QScreen * targetScreen = 0)
QWindow(QWindow * parent)
virtual ~QSurface()
virtual ~QWindow()
QSize baseSize() const
Qt::ScreenOrientation contentOrientation() const
void create()
QCursor cursor() const
void destroy()
virtual QObject * focusObject() const
virtual QSurfaceFormat format() const = 0
QRect frameGeometry() const
QMargins frameMargins() const
QPoint framePos() const
QRect geometry() const
int height() const
bool isActive() const
bool isAncestorOf(const QWindow * child, 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
QSize maximumSize() const
QSize minimumSize() const
QWindow * parent() const
QPoint pos() const
void reportContentOrientationChange(Qt::ScreenOrientation orientation)
void requestActivateWindow()
bool requestWindowOrientation(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 &)
void setFormat(const QSurfaceFormat & format)
void setFramePos(const QPoint & point)
void setGeometry(int posx, int posy, int w, int h)
void setGeometry(const QRect & rect)
bool setKeyboardGrabEnabled(bool grab)
void setMaximumSize(const QSize & size)
void setMinimumSize(const QSize & size)
bool setMouseGrabEnabled(bool grab)
void setOpacity(qreal level)
void setParent(QWindow * parent)
void setPos(const QPoint & pt)
void setPos(int posx, int posy)
void setScreen(QScreen * newScreen)
void setSizeIncrement(const QSize & size)
void setSurfaceType(SurfaceType surfaceType)
void setTransientParent(QWindow * parent)
void setWindowFlags(Qt::WindowFlags flags)
void setWindowIcon(const QIcon & icon)
void setWindowModality(Qt::WindowModality windowModality)
void setWindowState(Qt::WindowState state)
virtual QSize size() const = 0
QSize sizeIncrement() const
SurfaceClass surfaceClass() const
virtual QPlatformSurface * surfaceHandle() const = 0
virtual SurfaceType surfaceType() const = 0
QWindow * transientParent() const
void unsetCursor()
int width() const
WId winId() const
Qt::WindowFlags windowFlags() const
QIcon windowIcon() const
Qt::WindowModality windowModality() const
Qt::ScreenOrientation windowOrientation() const
Qt::WindowState windowState() const
QString windowTitle() const
Qt::WindowType windowType() const
int x() const
int y() const

Reimplemented Public Functions

virtual QSurfaceFormat format() const
virtual QSize size() const
virtual SurfaceType surfaceType() const
  • 31 public functions inherited from QObject

Public Slots

bool close()
void hide()
void lower()
void raise()
void setHeight(int arg)
void setVisible(bool visible)
void setWidth(int arg)
void setWindowTitle(const QString &)
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 contentOrientationChanged(Qt::ScreenOrientation orientation)
void focusObjectChanged(QObject * focusObject)
void heightChanged(int arg)
void screenChanged(QScreen * screen)
void visibleChanged(bool arg)
void widthChanged(int arg)
void windowModalityChanged(Qt::WindowModality windowModality)
void xChanged(int arg)
void yChanged(int arg)

Protected Functions

QSurface(SurfaceClass type)
QWindow(QWindowPrivate & dd, QWindow * parent)
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 touchEvent(QTouchEvent * ev)
virtual void wheelEvent(QWheelEvent * ev)

Reimplemented Protected Functions

virtual bool event(QEvent * ev)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 11 static public members inherited from QObject

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.

Resource management

Windows can potentially use a lot of memory. A usual measurement is width times height times color depth. A window might also include multiple buffers to support double and triple buffering, as well as depth and stencil buffers. To release a window's memory resources, the destroy() function.

Window and content orientation

QWindow has reportContentOrientationChange() and requestWindowOrientation() that can be used to specify the layout of the window contents in relation to the screen. The window orientation determines the actual buffer layout of the window, and the windowing system uses this value to rotate the window before it ends up on the display, and to ensure that input coordinates are in the correct coordinate space relative to the application.

On the other hand, the content orientation is simply a hint to the windowing system about which orientation the window contents are in. It's useful when you wish to keep the same buffer layout, but rotate the contents instead, especially when doing rotation animations between different orientations. The windowing system might use this value to determine the layout of system popups or dialogs.

Visibility and Windowing system exposure.

By default, the window is not visible, and you must call setVisible(true), or show() or similar to make it visible. To make a window hidden again, call setVisible(false) or hide(). The visible property describes the state the application wants the window to be in. Depending on the underlying system, a visible window might still not be shown on the screen. It could, for instance, be covered by other opaque windows or moved outside the physical area of the screen. On windowing systems that have exposure notifications, the isExposed() accessor describes whether the window should be treated as directly visible on screen. The exposeEvent() function is called whenever the windows exposure in the windowing system changes. On windowing systems that do not make this information visible to the application, isExposed() will simply return the same value as isVisible().

Rendering

There are two Qt APIs that can be used to render content into a window, QBackingStore for rendering with a QPainter and flushing the contents to a window with type QSurface::RasterSurface, and QOpenGLContext for rendering with OpenGL to a window with type QSurface::OpenGLSurface.

The application can start rendering as soon as isExposed() returns true, and can keep rendering until it isExposed() returns false. To find out when isExposed() changes, reimplement exposeEvent(). The window will always get a resize event before the first expose event.

Member Type Documentation

enum QWindow::AncestorMode

This enum is used to control whether or not transient parents should be considered ancestors.

ConstantValueDescription
QWindow::ExcludeTransients0Transient parents are not considered ancestors.
QWindow::IncludeTransients1Transient parents are considered ancestors.

Property Documentation

contentOrientation : Qt::ScreenOrientation

This property holds the orientation of the window's contents.

This is a hint to the window manager in case it needs to display additional content like popups, dialogs, status bars, or similar in relation to the window.

The recommended orientation is QScreen::orientation() but an application doesn't have to support all possible orientations, and thus can opt to ignore the current screen orientation.

The difference between the window and the content orientation determines how much to rotate the content by. QScreen::angleBetween(), QScreen::transformBetween(), and QScreen::mapBetween() can be used to compute the necessary transform.

The default value is Qt::PrimaryOrientation

Access functions:

Qt::ScreenOrientation contentOrientation() const
void reportContentOrientationChange(Qt::ScreenOrientation orientation)

Notifier signal:

void contentOrientationChanged(Qt::ScreenOrientation orientation)

See also requestWindowOrientation() and QScreen::orientation().

cursor : QCursor

This property holds the cursor shape for this window.

The mouse cursor will assume this shape when it is over this window, unless an override cursor is set. See the list of predefined cursor objects for a range of useful shapes.

By default, this property contains a cursor with the Qt::ArrowCursor shape.

Some underlying window implementations will reset the cursor if it leaves a window even if the mouse is grabbed. If you want to have a cursor set for all windows, even when outside the window, consider QGuiApplication::setOverrideCursor().

Access functions:

QCursor cursor() const
void setCursor(const QCursor &)
void unsetCursor()

See also QGuiApplication::setOverrideCursor().

height : int

This property holds the height of the window's geometry.

Access functions:

int height() const
void setHeight(int arg)

Notifier signal:

void heightChanged(int arg)

visible : bool

This property holds whether the window is visible or not.

This property controls the visibility of the window in the windowing system.

By default, the window is not visible, you must call setVisible(true), or show() or similar to make it visible.

Access functions:

bool isVisible() const
void setVisible(bool visible)

Notifier signal:

void visibleChanged(bool arg)

See also show().

width : int

This property holds the width of the window's geometry.

Access functions:

int width() const
void setWidth(int arg)

Notifier signal:

void widthChanged(int arg)

windowIcon : QIcon

Access functions:

QIcon windowIcon() const
void setWindowIcon(const QIcon & icon)

windowModality : Qt::WindowModality

This property holds the modality of the window.

A modal window prevents other windows from receiving input events. Qt supports two types of modality: Qt::WindowModal and Qt::ApplicationModal.

By default, this property is Qt::NonModal

Access functions:

Qt::WindowModality windowModality() const
void setWindowModality(Qt::WindowModality windowModality)

Notifier signal:

void windowModalityChanged(Qt::WindowModality windowModality)

See also Qt::WindowModality.

windowTitle : QString

This property holds the window's title in the windowing system.

The window title might appear in the title area of the window decorations, depending on the windowing system and the window flags. It might also be used by the windowing system to identify the window in other contexts, such as in the task switcher.

Access functions:

QString windowTitle() const
void setWindowTitle(const QString &)

See also windowFlags().

x : int

This property holds the x position of the window's geometry.

Access functions:

int x() const
void setX(int arg)

Notifier signal:

void xChanged(int arg)

y : int

This property holds the y position of the window's geometry.

Access functions:

int y() const
void setY(int arg)

Notifier signal:

void yChanged(int arg)

Member Function Documentation

QWindow::QWindow(QScreen * targetScreen = 0)

Creates a window as a top level on the given screen.

The window is not shown until setVisible(true), show(), or similar is called.

See also setScreen().

QWindow::QWindow(QWindow * parent)

Creates a window as a child of the given parent window.

The window will be embedded inside the parent window, its coordinates relative to the parent.

The screen is inherited from the parent.

See also setParent().

QWindow::QWindow(QWindowPrivate & dd, QWindow * parent) [protected]

QWindow::~QWindow() [virtual]

Destroys the window.

QSize QWindow::baseSize() const

Returns the base size of the window.

See also setBaseSize().

bool QWindow::close() [slot]

Close the window.

This closes the window, effectively calling destroy(), and potentially quitting the application

See also destroy() and QGuiApplication::quitOnLastWindowClosed().

void QWindow::create()

Allocates the platform resources associated with the window.

It is at this point that the surface format set using setFormat() gets resolved into an actual native surface. However, the window remains hidden until setVisible() is called.

Note that it is not usually necessary to call this function directly, as it will be implicitly called by show(), setVisible(), and other functions that require access to the platform resources.

Call destroy() to free the platform resources if necessary.

See also destroy().

void QWindow::destroy()

Releases the native platform resources associated with this window.

See also create().

bool QWindow::event(QEvent * ev) [virtual protected]

Reimplemented from QObject::event().

Override this to handle any event sent to the window.

Remember to call the base class version if you wish for mouse events, key events, resize events, etc to be dispatched as usual.

void QWindow::exposeEvent(QExposeEvent * ev) [virtual protected]

The expose event is sent by the window system whenever the window's exposure on screen changes.

The application can start rendering into the window with QBackingStore and QOpenGLContext as soon as it gets an exposeEvent() such that isExposed() is true.

If the window is moved off screen, is made totally obscured by another window, iconified or similar, this function might be called and the value of isExposed() might change to false. When this happens, an application should stop its rendering as it is no longer visible to the user.

A resize event will always be sent before the expose event the first time a window is shown.

See also isExposed().

void QWindow::focusInEvent(QFocusEvent * ev) [virtual protected]

Override this to handle focus in events.

Focus in events are sent when the window receives keyboard focus.

See also focusOutEvent.

QObject * QWindow::focusObject() const [virtual]

Returns the QObject that will be the final receiver of events tied focus, such as key events.

void QWindow::focusObjectChanged(QObject * focusObject) [signal]

This signal is emitted when final receiver of events tied to focus is changed.

See also focusObject().

void QWindow::focusOutEvent(QFocusEvent * ev) [virtual protected]

Override this to handle focus out events.

Focus out events are sent when the window loses keyboard focus.

See also focusInEvent.

QSurfaceFormat QWindow::format() const [virtual]

Reimplemented from QSurface::format().

Returns the actual format of this window.

After the window has been created, this function will return the actual surface format of the window. It might differ from the requested format if the requested format could not be fulfilled by the platform.

See also setFormat(), create(), and requestedFormat().

QRect QWindow::frameGeometry() const

Returns the geometry of the window, including its window frame.

See also geometry() and frameMargins().

QMargins QWindow::frameMargins() const

Returns the window frame margins surrounding the window.

See also geometry() and frameGeometry().

QPoint QWindow::framePos() const

Returns the top left position of the window, including its window frame.

This returns the same value as frameGeometry().topLeft().

See also setFramePos(), geometry(), and frameGeometry().

QRect QWindow::geometry() const

Returns the geometry of the window, excluding its window frame.

See also setGeometry(), frameMargins(), and frameGeometry().

void QWindow::hide() [slot]

Hides the window.

Equivalent to calling setVisible(false).

See also show() and setVisible().

void QWindow::hideEvent(QHideEvent * ev) [virtual protected]

Override this to handle hide evens.

The function is called when the window has requested being hidden in the windowing system.

bool QWindow::isActive() const

Returns true if the window should appear active from a style perspective.

This is the case for the window that has input focus as well as windows that are in the same parent / transient parent chain as the focus window.

To get the window that currently has focus, use QGuiApplication::focusWindow().

bool QWindow::isAncestorOf(const QWindow * child, AncestorMode mode = IncludeTransients) const

Returns true if the window is an ancestor of the given child. If mode is IncludeTransients transient parents are also considered ancestors.

bool QWindow::isExposed() const

Returns if this window is exposed in the windowing system.

When the window is not exposed, it is shown by the application but it is still not showing in the windowing system, so the application should minimize rendering and other graphical activities.

An exposeEvent() is sent every time this value changes.

See also exposeEvent().

bool QWindow::isModal() const

Returns whether the window is modal.

A modal window prevents other windows from getting any input.

See also QWindow::windowModality.

bool QWindow::isTopLevel() const

Returns whether the window is top level, i.e. has no parent window.

void QWindow::keyPressEvent(QKeyEvent * ev) [virtual protected]

Override this to handle key press events.

See also keyReleaseEvent.

void QWindow::keyReleaseEvent(QKeyEvent * ev) [virtual protected]

Override this to handle key release events.

See also keyPressEvent.

void QWindow::lower() [slot]

Lower the window in the windowing system.

Requests that the window be lowered to appear below other windows.

QPoint QWindow::mapFromGlobal(const QPoint & pos) const

Translates the global screen coordinate pos to window coordinates.

See also mapToGlobal().

QPoint QWindow::mapToGlobal(const QPoint & pos) const

Translates the window coordinate pos to global screen coordinates. For example, mapToGlobal(QPoint(0,0)) would give the global coordinates of the top-left pixel of the window.

See also mapFromGlobal().

QSize QWindow::maximumSize() const

Returns the maximum size of the window.

See also setMaximumSize().

QSize QWindow::minimumSize() const

Returns the minimum size of the window.

See also setMinimumSize().

void QWindow::mouseDoubleClickEvent(QMouseEvent * ev) [virtual protected]

Override this to handle mouse double click events.

See also mousePressEvent() and QStyleHints::mouseDoubleClickInterval().

void QWindow::mouseMoveEvent(QMouseEvent * ev) [virtual protected]

Override this to handle mouse move events.

void QWindow::mousePressEvent(QMouseEvent * ev) [virtual protected]

Override this to handle mouse press events.

See also mouseReleaseEvent().

void QWindow::mouseReleaseEvent(QMouseEvent * ev) [virtual protected]

Override this to handle mouse release events.

See also mousePressEvent().

void QWindow::moveEvent(QMoveEvent * ev) [virtual protected]

Override this to handle mouse events.

bool QWindow::nativeEvent(const QByteArray & eventType, void * message, long * result) [virtual protected]

Override this to handle platform dependent events.

This might make your application non-portable.

QWindow * QWindow::parent() const

Returns the parent window, if any.

A window without a parent is known as a top level window.

See also setParent().

QPoint QWindow::pos() const

See also setPos().

void QWindow::raise() [slot]

Raise the window in the windowing system.

Requests that the window be raised to appear above other windows.

void QWindow::requestActivateWindow()

Requests the window to be activated, i.e. receive keyboard focus.

See also isActive() and QGuiApplication::focusWindow().

bool QWindow::requestWindowOrientation(Qt::ScreenOrientation orientation)

Requests the given window orientation.

The window orientation specifies how the window should be rotated by the window manager in order to be displayed. Input events will be correctly mapped to the given orientation.

The return value is false if the system doesn't support the given orientation (for example when requesting a portrait orientation on a device that only handles landscape buffers, typically a desktop system).

If the return value is false, call windowOrientation() to get the actual supported orientation.

See also windowOrientation(), reportContentOrientationChange(), and QScreen::orientation().

QSurfaceFormat QWindow::requestedFormat() const

Returns the requested surfaceformat of this window.

If the requested format was not supported by the platform implementation, the requestedFormat will differ from the actual window format.

This is the value set with setFormat().

See also setFormat() and format().

void QWindow::resize(const QSize & newSize)

Sets the size of the window to be newSize.

See also setGeometry().

void QWindow::resize(int w, int h)

void QWindow::resizeEvent(QResizeEvent * ev) [virtual protected]

Override this to handle resize events.

The resize event is called whenever the window is resized in the windowing system, either directly through the windowing system acknowledging a setGeometry() or resize() request, or indirectly through the user resizing the window manually.

QScreen * QWindow::screen() const

Returns the screen on which the window is shown.

The value returned will not change when the window is moved between virtual screens (as returned by QScreen::virtualSiblings()).

See also setScreen() and QScreen::virtualSiblings().

void QWindow::screenChanged(QScreen * screen) [signal]

This signal is emitted when a window's screen changes, either by being set explicitly with setScreen(), or automatically when the window's screen is removed.

void QWindow::setBaseSize(const QSize & size)

Sets the base size of the window.

The base size is used to calculate a proper window size if the window defines sizeIncrement().

See also setMinimumSize(), setMaximumSize(), setSizeIncrement(), and baseSize().

void QWindow::setFormat(const QSurfaceFormat & format)

Sets the window's surface format.

The format determines properties such as color depth, alpha, depth and stencil buffer size, etc.

See also format().

void QWindow::setFramePos(const QPoint & point)

Sets the upper left position of the window including its window frame.

See also framePos(), setGeometry(), and frameGeometry().

void QWindow::setGeometry(int posx, int posy, int w, int h)

See also geometry().

void QWindow::setGeometry(const QRect & rect)

Sets the geometry of the window, excluding its window frame, to rect.

To make sure the window is visible, make sure the geometry is within the virtual geometry of its screen.

See also geometry(), screen(), and QScreen::virtualGeometry().

bool QWindow::setKeyboardGrabEnabled(bool grab)

Set whether keyboard grab should be enabled or not.

If the return value is true, the window receives all key events until setKeyboardGrabEnabled(false) is called; other windows get no key events at all. Mouse events are not affected. Use setMouseGrabEnabled() if you want to grab that.

See also setMouseGrabEnabled().

void QWindow::setMaximumSize(const QSize & size)

Sets the maximum size of the window.

This is a hint to the window manager to prevent resizing above the specified size.

See also setMinimumSize() and maximumSize().

void QWindow::setMinimumSize(const QSize & size)

Sets the minimum size of the window.

This is a hint to the window manager to prevent resizing below the specified size.

See also setMaximumSize() and minimumSize().

bool QWindow::setMouseGrabEnabled(bool grab)

Sets whether mouse grab should be enabled or not.

If the return value is true, the window receives all mouse events until setMouseGrabEnabled(false) is called; other windows get no mouse events at all. Keyboard events are not affected. Use setKeyboardGrabEnabled() if you want to grab that.

See also setKeyboardGrabEnabled().

void QWindow::setOpacity(qreal level)

Sets the window's opacity in the windowing system to level.

If the windowing system supports window opacity, this can be used to fade the window in and out, or to make it semitransparent.

A value of 1.0 or above is treated as fully opaque, whereas a value of 0.0 or below is treated as fully transparent. Values inbetween represent varying levels of translucency between the two extremes.

void QWindow::setParent(QWindow * parent)

Sets the parent Window. This will lead to the windowing system managing the clip of the window, so it will be clipped to the parent window.

Setting parent to be 0 will make the window become a top level window.

See also parent().

void QWindow::setPos(const QPoint & pt)

See also pos().

void QWindow::setPos(int posx, int posy)

void QWindow::setScreen(QScreen * newScreen)

Sets the screen on which the window should be shown.

If the window has been created, it will be recreated on the new screen.

Note that if the screen is part of a virtual desktop of multiple screens, the window can appear on any of the screens returned by QScreen::virtualSiblings().

See also screen() and QScreen::virtualSiblings().

void QWindow::setSizeIncrement(const QSize & size)

Sets the size increment of the window.

When the user resizes the window, the size will move in steps of sizeIncrement().width() pixels horizontally and sizeIncrement().height() pixels vertically, with baseSize() as the basis.

By default, this property contains a size with zero width and height.

The windowing system might not support size increments.

See also sizeIncrement(), setBaseSize(), setMinimumSize(), and setMaximumSize().

void QWindow::setSurfaceType(SurfaceType surfaceType)

Set the surfaceType of the window.

Specifies whether the window is meant for raster rendering with QBackingStore, or OpenGL rendering with QOpenGLContext.

See also surfaceType(), QBackingStore, and QOpenGLContext.

void QWindow::setTransientParent(QWindow * parent)

Sets the transient parent

This is a hint to the window manager that this window is a dialog or pop-up on behalf of the given window.

See also transientParent() and parent().

void QWindow::setWindowFlags(Qt::WindowFlags flags)

Sets the window flags of the window to flags.

The window flags control the window's appearance in the windowing system, whether it's a dialog, popup, or a regular window, and whether it should have a title bar, etc.

See also windowFlags().

void QWindow::setWindowState(Qt::WindowState state)

Sets the desired window state.

The window state represents whether the window appears in the windowing system as maximized, minimized, fullscreen, or normal.

The enum value Qt::WindowActive is not an accepted parameter.

See also windowState(), showNormal(), showFullScreen(), showMinimized(), and showMaximized().

void QWindow::show() [slot]

Shows the window.

This equivalent to calling showFullScreen() or showNormal(), depending on whether the platform defaults to windows being fullscreen or not.

See also showFullScreen(), showNormal(), hide(), and QStyleHints::showIsFullScreen().

void QWindow::showEvent(QShowEvent * ev) [virtual protected]

Override this to handle show events.

The function is called when the window has requested becoming visible.

If the window is successfully shown by the windowing system, this will be followed by a resize and an expose event.

void QWindow::showFullScreen() [slot]

Shows the window as fullscreen.

Equivalent to calling setWindowState(Qt::WindowFullScreen) and then setVisible(true).

See also setWindowState() and setVisible().

void QWindow::showMaximized() [slot]

Shows the window as maximized.

Equivalent to calling setWindowState(Qt::WindowMaximized) and then setVisible(true).

See also setWindowState() and setVisible().

void QWindow::showMinimized() [slot]

Shows the window as minimized.

Equivalent to calling setWindowState(Qt::WindowMinimized) and then setVisible(true).

See also setWindowState() and setVisible().

void QWindow::showNormal() [slot]

Shows the window as normal, i.e. neither maximized, minimized, nor fullscreen.

Equivalent to calling setWindowState(Qt::WindowNoState) and then setVisible(true).

See also setWindowState() and setVisible().

QSize QWindow::size() const [virtual]

QSize QWindow::sizeIncrement() const

Returns the size increment of the window.

See also setSizeIncrement().

SurfaceType QWindow::surfaceType() const [virtual]

Reimplemented from QSurface::surfaceType().

Returns the surface type of the window.

See also setSurfaceType().

void QWindow::touchEvent(QTouchEvent * ev) [virtual protected]

Override this to handle touch events.

QWindow * QWindow::transientParent() const

Returns the transient parent of the window.

See also setTransientParent() and parent().

void QWindow::wheelEvent(QWheelEvent * ev) [virtual protected]

Override this to handle mouse wheel or other wheel events.

WId QWindow::winId() const

Returns the window's platform id.

For platforms where this id might be useful, the value returned will uniquely represent the window inside the corresponding screen.

See also screen().

Qt::WindowFlags QWindow::windowFlags() const

Returns the window flags of the window.

This might differ from the flags set with setWindowFlags() if the requested flags could not be fulfilled.

See also setWindowFlags().

Qt::ScreenOrientation QWindow::windowOrientation() const

Returns the actual window orientation.

The default value is Qt::PrimaryOrientation.

See also requestWindowOrientation().

Qt::WindowState QWindow::windowState() const

Returns the window state.

See also setWindowState().

Qt::WindowType QWindow::windowType() const

Returns the type of the window.

This returns the part of the window flags that represents whether the window is a dialog, tooltip, popup, regular window, etc.

See also windowFlags() and setWindowFlags().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web