Handle calling wxWindow::Hide() before Create() in wxQt

Hide the window explicitly once it's created. This is not very useful,
as the real purpose of calling Hide() before Create() is to prevent the
window from being initially shown at all to avoid flicker, but better
than not hiding it at all.

Closes https://github.com/wxWidgets/wxWidgets/pull/1203
This commit is contained in:
phowstan 2019-01-29 15:08:32 +00:00 committed by Vadim Zeitlin
parent e831703aae
commit 89e5663a75

View File

@ -367,6 +367,11 @@ void wxWindowQt::PostCreation(bool generic)
GetHandle()->setFont( wxWindowBase::GetFont().GetHandle() );
// The window might have been hidden before Create() and it needs to remain
// hidden in this case, so do it (unfortunately there doesn't seem to be
// any way to create the window initially hidden with Qt).
GetHandle()->setVisible(m_isShown);
wxWindowCreateEvent event(this);
HandleWindowEvent(event);
}