Dear all,
I'm trying to scroll very large list to specific position when main window is opened. As far as I understand for this I need to add code to spontaneous showEvent because this is one executed just after window is opened.
Here is the code:

Qt Code:
  1. void MainWindow::showEvent(QShowEvent *event){
  2. if(event->spontaneous()){
  3. qDebug()<<"after";
  4. } else qDebug()<<"before";
  5. }
To copy to clipboard, switch view to plain text mode 

This always prints "before" - there is no spontaneous event at all! It seems that i missed something simple. Any help is deeply appreciated!