PDA

View Full Version : About Editing QtreeWidget



nikhilqt
22nd January 2008, 13:46
Hi,

My QtreeWidgetItem contains 3 columns, is it possible to Edit the QTreeWidgetItem columnwise like, editing only certain columns of a QTreeWidgetItem but not as a whole Item.




void classGUI::on_treeWidget_itemDoubleClicked(QTreeWid getItem* itm,int col)
{
if(col == 0)
{
//if(itm)
//{
itm->setFlags(itm->flags());
//}
}
else
{
itm->setFlags(itm->flags() | Qt::ItemIsEditable);
// this ll make us edit Respective QTreeWidgetItem(all the columns it has)
}
}


but , it should not be editable when i double click first column of the QTreeWidgetItem.

jpn
22nd January 2008, 13:51
See post #7: http://www.qtcentre.org/forum/f-qt-programming-2/t-qtreewidgetitem-questions-7031.html