Only call setVisible on this item after it has been put in a layout

If you call setVisible(true) on the item before it is placed in a
hierarchy, it will show as a normal top-level window. On some platforms
this isn't really an issue, but with Carbon, the show happens
immediately, so you get this flash of a window which is really
disturbing. I'm surprised it's not noticed on other platforms.
Personally, I'm not sure why we call this at all, but I'm leaving it for
the moment.
This commit is contained in:
Norwegian Rock Cat
2009-07-07 14:58:26 +02:00
parent 6bb6f5168d
commit 77959c8bc5

View File

@@ -302,9 +302,9 @@ bool MainWindow::init(QString *errorMessage)
m_outputMode->setPriority(Constants::P_MODE_OUTPUT);
m_outputMode->setWidget(outputModeWidget);
OutputPanePlaceHolder *oph = new OutputPanePlaceHolder(m_outputMode);
oph->setVisible(true);
oph->setCloseable(false);
outputModeWidget->layout()->addWidget(oph);
oph->setVisible(true);
outputModeWidget->layout()->addWidget(new Core::FindToolBarPlaceHolder(m_outputMode));
outputModeWidget->setFocusProxy(oph);