puiseux
21st January 2013, 12:52
Hello,
i need to choose a strategy before going ahead. My problem is quite simple :
I have a 2d polygon, or node list in a C++ or Python array, I want two views of this polygon (without diplicate node data) :
- one graphical view, with mouse drag-and-drop abilities (i move nodes with the mouse)
- one table view with usual editing abilities.
Of course, i want my two views to be synchronized, so i use view-model programming.
I've created a custom model for data
The QTableView "as is" is perfect for table view/edit
My question is : for graphical view, do i use a custom Delegate or a custom AbstractView ?
Any advice, (link, template ?, piece of code ??) on this problem is welcome.
N.B. I've explored QT examples, and chart example seems to drive me to a custom view...
Thanks for your answer.
i need to choose a strategy before going ahead. My problem is quite simple :
I have a 2d polygon, or node list in a C++ or Python array, I want two views of this polygon (without diplicate node data) :
- one graphical view, with mouse drag-and-drop abilities (i move nodes with the mouse)
- one table view with usual editing abilities.
Of course, i want my two views to be synchronized, so i use view-model programming.
I've created a custom model for data
The QTableView "as is" is perfect for table view/edit
My question is : for graphical view, do i use a custom Delegate or a custom AbstractView ?
Any advice, (link, template ?, piece of code ??) on this problem is welcome.
N.B. I've explored QT examples, and chart example seems to drive me to a custom view...
Thanks for your answer.