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.
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.