wenn32
6th May 2011, 18:14
hello i am new in using qtableview and i just wanted to know how do you clear the selection using QStandardItemModel
i used the following functions
main_tableview->setSelectionBehavior(QAbstractItemView::SelectRows );
main_tableview->setSelectionMode(QAbstractItemView::SingleSelectio n);
main_tableview is the qtableview object
now when i click any one of the item it selects the entire row(as i have set the properties above)
now how do i deselect or clear the selection???
i looked into the documentation but could not find any functions.
Thanks for the help!
i used the following functions
main_tableview->setSelectionBehavior(QAbstractItemView::SelectRows );
main_tableview->setSelectionMode(QAbstractItemView::SingleSelectio n);
main_tableview is the qtableview object
now when i click any one of the item it selects the entire row(as i have set the properties above)
now how do i deselect or clear the selection???
i looked into the documentation but could not find any functions.
Thanks for the help!