how to set the item selection forcefully in Qt

Posted by Solitaire on Stack Overflow See other posts from Stack Overflow or by Solitaire
Published on 2010-03-19T06:33:04Z Indexed on 2010/03/19 8:41 UTC
Read the original article Hit count: 179

Filed under:
|
|
|
|

Hi.. Can any one tell me how to set the item to be selected forcefully..

I tried this after adding items to list row..

QModelIndex index = mylistview->currentIndex();
             mylistview ->setCurrentIndex(index);

its not working.. index I am getting index (-1,-1).. can any one help me on this

Thanks

© Stack Overflow or respective owner

Related posts about qt

Related posts about qt4