yesint
2nd November 2010, 14:39
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:
void MainWindow::showEvent(QShowEvent *event){
if(event->spontaneous()){
qDebug()<<"after";
} else qDebug()<<"before";
}
This always prints "before" - there is no spontaneous event at all! It seems that i missed something simple. Any help is deeply appreciated!
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:
void MainWindow::showEvent(QShowEvent *event){
if(event->spontaneous()){
qDebug()<<"after";
} else qDebug()<<"before";
}
This always prints "before" - there is no spontaneous event at all! It seems that i missed something simple. Any help is deeply appreciated!