QTreeWidget - multiple columns d&d
-
I have a QTreeWidget with tree columns:
@void MyTree::AddNewElement()
{
QTreeWidgetItem* treeItem = new QTreeWidgetItem( this, 0 );
treeItem->setText( 0, "someText" );
setItemWidget( treeItem, 1, new QToolButton( this ) );
setItemWidget( treeItem, 2, new QToolButton( this ) );
}@for this widget I want to implement d&d so all the columns should keep their content. Right now when I'm d&d only the text column keeps the content. How should I do it right?
Thanks!
-
yes you're right about this, I need to do some more studying :) , I found a nice example "here":http://www.java2s.com/Code/Cpp/Qt/QTreeViewdraganddrop.htm