That would be a new model. You can try to derive from the model to extend it or possibly try to use a proxy model to encapsulate the extension.
Best, Stefan From: Albert Alises [mailto:ironicpsy...@gmail.com] Sent: Dienstag, 27. September 2016 15:43 To: Kislinskiy, Stefan Subject: Re: [mitk-users] Problem with usage of QmitkDataStorageTableModel Hi Stefan, Thank you very much! I was not familiar with the view/model concept. However, when creating the table, it seems that the header data of the table cannot be easily edited.. is there a way to show the node properties we want in the different columns (e.g name and color in two columns), or should a new model be created for this? Thank you, Albert. 2016-09-27 14:18 GMT+02:00 Kislinskiy, Stefan <s.kislins...@dkfz-heidelberg.de<mailto:s.kislins...@dkfz-heidelberg.de>>: Hi Albert, you want to add a QTreeView and set its model to the QmitkDataStorageTableModel instead. See [1] for an example, which also uses an additional proxy model for filtering/sorting purposes. Also see [2] and [3] for more information on the model/view concept of Qt. Best, Stefan [1] https://phabricator.mitk.org/diffusion/MITK/browse/master/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp;2f9115cd5909c2e29c9e05ce5e0eb953b4d29740$125-155 [2] http://doc.qt.io/qt-5/modelview.html [3] http://doc.qt.io/qt-5/model-view-programming.html From: Albert Alises [mailto:ironicpsy...@gmail.com<mailto:ironicpsy...@gmail.com>] Sent: Dienstag, 27. September 2016 13:00 To: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net> Subject: [mitk-users] Problem with usage of QmitkDataStorageTableModel Hello, I have a problem/missunderstanding with the usage of the QmitkDataStorageTableModel. I want to add a table to my view so it shows certain nodes of the data storage and a property. However, when trying to create all the widgets from the .ui file, it detects that it cannot be created as it is a Q_OBJECT, not a widget. Furthermore, when trying to create it programatically, I do not know how to add it to an existing Qt layout, as it apparently only accepts widgets to be added to a layout, not objects. How can I work my way through it to add the table to the GUI (via Qt Designer for instance), or programatically? I am quite lost on that, and casting and such does not seem to work for me. Thank you, Albert.
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users