Is there any Custom widget like the BluePrint or FlowGraph ?
-
is there any Custom widget like the BluePrint or FlowGraph as shown below?
if not, is there any good idea to realize it? a custom widget inherit from Listbox, and what class should be used to draw the curves?
Thanks very much!
!http://fc06.deviantart.net/fs71/f/2014/084/4/9/t6_by_zerodollarz-d7bmcno.png(a)!!http://staraban.com/wp-content/uploads/2014/03/unreal-engine-4-blueprint-editor.jpg(b)!
-
I wouldn't use widgets for that. They are not particularly well with moving, scaling, animating and doing non-rectangular shapes (like the curves).
I would use a QGraphicsView, "QGraphicsPathItem":http://qt-project.org/doc/qt-5/qgraphicspathitem.html for the curves and maybe "QGraphicsProxyWidget":http://qt-project.org/doc/qt-5/qgraphicsproxywidget.html for the boxes.
You would get move, scale etc. implementing very little yourself. -
please check "here":http://qt-project.org/doc/qt-4.8/graphicsview-diagramscene.html
http://qt-project.org/doc/qt-4.8/graphicsview-diagramscene.htmlit should do what you want..
-
thank you.
and i met another problem.
i can add some controls on a dialog, and then setWidget() this dialog to the QGraphicsProxyWidget. it works.
BUT, i want to use the QGraphicsItem as a "layout"(which i can render the backgound by myself), and i add directly add some controls(eg. label, editbox, etc) on it...and then i can add some QGraphicsItem on the QGraphicsProxyWidget.
is there any way to do this?
ps. i tried to do like this, but still not works. the link is : http://qt-project.org/forums/viewthread/47596/