Maybe, yes.... I don't understand with "after some event from MainWindow".
For example, if you have a pushbutton, you connect it's clicked() signal to your pusbutton_clicked() slot, then in your pushbutton_clicked() function you called selectedIndexes().
Bookmarks