Added a visible state to QWindow

(cherry picked from commit 6cd96d1921af9740bf92405ae3adf466140f8923)
This commit is contained in:
Jørgen Lind 2011-04-27 11:57:43 +02:00 committed by Samuel Rødal
parent 2a8189035f
commit d04aee22e7
2 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public:
, windowFlags(Qt::Window)
, surfaceType(QWindow::RasterSurface)
, platformWindow(0)
, visible(false)
, glContext(0)
, widget(0)
{
@ -75,6 +76,7 @@ public:
QWindow::SurfaceType surfaceType;
QPlatformWindow *platformWindow;
bool visible;
QWindowFormat requestedFormat;
QString windowTitle;
QRect geometry;
@ -116,6 +118,13 @@ void QWindow::setVisible(bool visible)
d->platformWindow->setVisible(visible);
}
bool QWindow::visible() const
{
Q_D(const QWindow);
return d->visible;
}
void QWindow::create()
{
Q_D(QWindow);

View File

@ -89,6 +89,8 @@ public:
void setWidget(QWidget *widget);
void setVisible(bool visible);
bool visible() const;
void create();
WId winId() const;