[Qt-interest] [QtS60-feedback] How to get selected listitem index in Qt

Ramesh ramesh.bs at robosoftin.com
Fri Apr 16 09:02:31 CEST 2010


Ya,

 

Thanks lot for the answer.

 

From: bharath.narayan at nokia.com [mailto:bharath.narayan at nokia.com] 
Sent: Friday, April 16, 2010 12:27 PM
To: ramesh.bs at robosoftin.com; qt-interest at trolltech.com;
QtS60-feedback at trolltech.com
Subject: RE: [QtS60-feedback] How to get selected listitem index in Qt

 

QItemSelectionModel * selectionModel
<http://doc.trolltech.com/4.6/qabstractitemview.html#selectionModel>  ()
gives you the selection model. From that get the QModelIndexList
selectedIndexes
<http://doc.trolltech.com/4.6/qitemselectionmodel.html#selectedIndexes>  ()
. That will give you a list of QModelIndex which are selected.

 

-Bharath Narayan M G

 

From: qts60-feedback-bounces at trolltech.com
[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of ext Ramesh
Sent: Friday, April 16, 2010 11:21 AM
To: qt-interest at trolltech.com; QtS60-feedback at trolltech.com
Subject: [QtS60-feedback] How to get selected listitem index in Qt

 

Hi all,

 

  I am having a QListView which having some items. Now i want to get the
index of selected item. i.e. if i select 5th element i

should get 5. How i can get this?..

 

waiting for reply. 

 

Thanks in advance

 

-R

 

 

-----------------------------------------------

Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies. Emails
to and from our network may be logged and monitored. This email and its
attachments are scanned for virus by our scanners and are believed to be
safe. However, no warranty is given that this email is free of malicious
content or virus.

 


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100416/319d434f/attachment.html 


More information about the Qt-interest-old mailing list