Hello!
Get selectionModel().selectedIndexes()
It is WModelIndexSet, typedef for std::set<WModelIndex> (this seems
not to be documented, but its name implies that it is a set, so we can
traverse it). If you want to visit each selected index:
const WModelIndexSet index_set = view->selectionModel().selectedIndexes();
for (WModelIndexSet::iterator index_iterator = index_set.begin();
index_iterator != index_set.end(); ++index_iterator) {
WModelIndex index = *index_iterator;
// do smth with index
}
Or you can use boost foreach:
#include <boost/foreach.hpp>
const WModelIndexSet index_set = view->selectionModel().selectedIndexes();
BOOST_FOREACH (WModelIndex index, index_set) {
// do smth with index
}
On Wed, May 2, 2012 at 4:55 PM, Oto Magaldadze <[email protected]> wrote:
> is it possible to get coordinates of selecteditems in WTableView?
>
> i tried selectionModel() to achieve that but couldn't succeed.
>
> Oto
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest