void PalringoListView::mousePressEvent( QMouseEvent *event ) { event->accept(); // if we get a mouse event then check the contacts to see which one wants to be selected for( int i = 0; i < this->listItems.size(); i++ ) { ListItem *l = this->listItems.at( i ); l->setSelected( l->getToSelect() ); } }
UI_FOREACH_WIDGET(getChildren(), it) { ListItem* child = static_cast<ListItem*>(*it); if (child->isSelected()) { if (item && child == item) return; child->setSelected(false); } }