[Qt-interest] how to set the item selection forcefully in Qt
Ramesh
ramesh.bs at robosoftin.com
Fri Mar 19 10:05:56 CET 2010
I found solution to my problem,
QModelIndex index = mylistmodel->index(row,column);
mylistview->setCurrentIndex(index);
still, I have one problem..
in my app, I am doing appendrow() to insert elements to listview,
when the rowsInserted signal is triggered, I am getting column numbers like
0,1,2,3 etc..
I want only one column i.e(0th column) only.
Appendrow() doesn't put elements to the next row or wat?
From: Ramesh [mailto:ramesh.bs at robosoftin.com]
Sent: Friday, March 19, 2010 11:47 AM
To: 'qt-interest at trolltech.com'; 'QtS60-feedback at trolltech.com'
Subject: how to set the item selection forcefully in Qt
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
-----------------------------------------------
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/20100319/0fc973c3/attachment.html
More information about the Qt-interest-old
mailing list