npc
8th March 2007, 09:34
Hi,
I am using QTreeWidget to display the No of items using QTreeWidgetItem like this
QTreeWidgetItem* n;
n = new QTreeWidgetItem ((QTreeWidget*)0, QStringList ( strList ));
n->setFlags ( n->flags() | Qt::ItemIsUserCheckable );
n->setCheckState (0,Qt::Unchecked);
I set selectionbehaviour to QAbstractItemView::SelectItems
and selectionmode to QAbstractItemView::ExtendedSelection
Now If I select the items in treewidget using shift+arrow (or) ctrl+mouse pointer and press spacebar, the last item which is selected is checked. but i want to check all the items which are selected. How to achive this ?
I am using Qt 4.2.2/windows
Thanks
*npc*
I am using QTreeWidget to display the No of items using QTreeWidgetItem like this
QTreeWidgetItem* n;
n = new QTreeWidgetItem ((QTreeWidget*)0, QStringList ( strList ));
n->setFlags ( n->flags() | Qt::ItemIsUserCheckable );
n->setCheckState (0,Qt::Unchecked);
I set selectionbehaviour to QAbstractItemView::SelectItems
and selectionmode to QAbstractItemView::ExtendedSelection
Now If I select the items in treewidget using shift+arrow (or) ctrl+mouse pointer and press spacebar, the last item which is selected is checked. but i want to check all the items which are selected. How to achive this ?
I am using Qt 4.2.2/windows
Thanks
*npc*