if (!d->platformWindow)
create();
+
+ if (visible) {
+ QShowEvent showEvent;
+ QGuiApplication::sendEvent(this, &showEvent);
+ }
+
d->platformWindow->setVisible(visible);
+
+ if (!visible) {
+ QHideEvent hideEvent;
+ QGuiApplication::sendEvent(this, &hideEvent);
+ }
}
bool QWindow::visible() const
void QWindow::showEvent(QShowEvent *)
{
- qDebug() << "unimplemented:" << __FILE__ << __LINE__;
}
void QWindow::hideEvent(QHideEvent *)
{
- qDebug() << "unimplemented:" << __FILE__ << __LINE__;
}
bool QWindow::event(QEvent *event)
exposeEvent(static_cast<QExposeEvent *>(event));
break;
+ case QEvent::Show:
+ showEvent(static_cast<QShowEvent *>(event));
+ break;
+
+ case QEvent::Hide:
+ hideEvent(static_cast<QHideEvent *>(event));
+ break;
+
default:
return QObject::event(event);
}