Is it possible to make only one item selectable in QTableWidget

qt, qt4

Solution

tableWidget->setSelectionBehavior( QAbstractItemView::SelectItems );
tableWidget->setSelectionMode( QAbstractItemView::SingleSelection );

Problem

I was wondering how and if it is possible to make only once cell or item selectable at a time, rather than allowing multiple selection. Thank you in advance.

Original source