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(QTreeWidgetItem* 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)
}
}
void classGUI::on_treeWidget_itemDoubleClicked(QTreeWidgetItem* 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)
}
}
To copy to clipboard, switch view to plain text mode
but , it should not be editable when i double click first column of the QTreeWidgetItem.
Bookmarks