tags:

views:

399

answers:

1

Hello, i'm trying to hide window after its startup. I have own window-class wich is inherited from QMainWindow. I rewrited 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, wich is true at start. Language: c++

+4  A: 

I don't quite follow. Surely you just don't call show() on your main window in the first place?

Troubadour
yeah, u'r right man =)
Ockonal