Added QWindow::requestedFormat()

Change-Id: I9e69ddd8ceefeda87216fb3d2507c40bc7220cf5
Reviewed-on: http://codereview.qt-project.org/5846
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
bb10
Gunnar Sletta 2011-09-29 20:42:27 +02:00 committed by Qt by Nokia
parent 28a31f41d1
commit 0c59eb1156
2 changed files with 16 additions and 0 deletions

View File

@ -234,6 +234,21 @@ void QWindow::setFormat(const QSurfaceFormat &format)
d->requestedFormat = format;
}
/*!
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.
\sa format.
*/
QSurfaceFormat QWindow::requestedFormat() const
{
Q_D(const QWindow);
return d->requestedFormat;
}
QSurfaceFormat QWindow::format() const
{
Q_D(const QWindow);

View File

@ -112,6 +112,7 @@ public:
void setFormat(const QSurfaceFormat &format);
QSurfaceFormat format() const;
QSurfaceFormat requestedFormat() const;
void setWindowFlags(Qt::WindowFlags flags);
Qt::WindowFlags windowFlags() const;