Hello, thank you for the hint
so you suggest removing Qt::ItemIsEditable only? I tried that but the double click does not work any more how do you edit the text in your case? here´s my setup: m_NodeTreeModel = new QmitkDataStorageTreeModel(this->GetDataStorage()); m_NodeTreeModel->setParent( parent ); m_NodeTreeModel->SetPlaceNewNodesOnTop(true); m_NodeTreeModel->SetShowHelperObjects(false); m_NodeTreeModel->SetShowBinaryObjects(true); m_NodeTreeModel->SetShowNodesContainingNoData(false); m_NodeTreeView = new QTreeView; m_NodeTreeView->setAnimated(true); m_NodeTreeView->setWordWrap(true); m_NodeTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection); m_NodeTreeView->setSelectionBehavior(QAbstractItemView::SelectRows); m_NodeTreeView->setAlternatingRowColors(false); m_NodeTreeView->setDragEnabled(true); m_NodeTreeView->setDropIndicatorShown(true); m_NodeTreeView->setAcceptDrops(true); m_NodeTreeView->setSortingEnabled(false); m_NodeTreeView->setContextMenuPolicy(Qt::CustomContextMenu); m_NodeTreeView->setModel(m_NodeTreeModel); m_NodeTreeView->installEventFilter(new QmitkNodeTableViewKeyFilter(this)); thank you, sebastian On 10/12/2011 12:07 PM, Miklos Espak wrote: > Hi, > > that editable thing was a bit disturbing, indeed. It was a flag set in > line 97 in CoreUI/Qmitk/QmitkDataStorageTreeModel.cpp. > (QmitkDataStorageTreeModel::flags(..) ) > > I removed the flag, and it seems to work nicely, however I do not know > if it would have some side-effects later, so it needs testing. > > You can check out the fix from here: > https://github.com/cim-unito/MITK/issues/26 > > Best, > Miklos > > On Wed, Oct 12, 2011 at 3:44 PM, Müller, Michael > <[email protected]> wrote: >> Hi Sebastian, >> >> yap we had some discussion about it. Unfortunately, this is the way Qt >> handles the editing of elements in a QTreeView, i.e. deleting the original >> value. Maybe, we can install a workaround in QmitkDataStorageTreeModel. Or >> maybe some of my colleagues on the list have an idea since I can`t remember >> the outcome of the previously mentioned discussion :) >> >> Best, >> Michael >> >> -----Ursprüngliche Nachricht----- >> Von: sebastian ordas [mailto:[email protected]] >> Gesendet: Mittwoch, 12. Oktober 2011 15:36 >> An: [email protected] >> Betreff: [mitk-users] DataManager row editing behavior >> >> Dear MITK users, >> >> This is rather a Qt question ... but I cannot change the editing >> behavior of DataManager´s treeview. >> >> I would like to keep the original text (e.g. highlighted) when double >> clicking on a row (node´s name) >> >> Did anyone manage to do that? >> >> thank you, >> sebastian >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2d-oct >> _______________________________________________ >> mitk-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mitk-users >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2d-oct >> _______________________________________________ >> mitk-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mitk-users >> ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
