Reputation: 64276
I'm trying to hide window after its startup. I have own window-class which is inherited from QMainWindow. I rewrote showEvent like this:
void showEvent (QShowEvent *evt)
{
if (firstShow)
{
hide();
firstShow = false;
}
else
{
QMainWindow::showEvent(evt);
}
}
But it doesn't work. firstShow is a boolean variable, which is true at start. Language: c++
Upvotes: 1
Views: 3093
Reputation: 13421
I don't quite follow. Surely you just don't call show() on your main window in the first place?
Upvotes: 6