[Qt-interest] [SOLVED] Re: How to get index of a QListView when no selection

Aaron Lewis the.warl0ck.1989 at gmail.com
Mon May 23 02:32:17 CEST 2011


On 21:29 Sun 22 May     , Bo Thorsen wrote:
> Den 22-05-2011 07:33, Aaron Lewis skrev:
> > Hi,
> > 	How can i get the index of arbitrary entry in a QListView ?
> >
> > 	When there's no selection , currentIndex().row() always returns -1.
> >
> > 	I need to retrieve the contents of the first entry in a QListView ,
> > 	basically i retrieve it withe a custom index , but in this case ,
> > 	how can i find a valid index ?
> 
> view()->index(0, 0) or one of the specific index() functions of the models.
> 

Thanks, it's resolved , i just forgot to forward my last mail to this
mailing list..

But thank you the same

-- 
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://http://pgp.mit.edu/ )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E



More information about the Qt-interest-old mailing list