Choice Of Gui Widget(Graphics View/ Model View) or QML
-
Hi I have a project to implement Graphical Editor for ladder programming language. and i'm standing against decision to implement it in QML or QT C++.
in C++it should be Graphic View Framework encapsulating widgets (Model/View freamwork) as drag/drop elements.
In QML, Custom View Elements(Model/View) on Canvas(parent element). but technically which is better and why?
any suggestions would be appreciated -
Hello!
Both should be good, just the one which is technically better is the one you control best and your knowledge is deeper.
Anyway, I would choose C++. Have a look to "this Qt Example":http://qt-project.org/doc/qt-5.0/qtwidgets/graphicsview-diagramscene.html if you didn't know about it. Don't waste too much time deciding your language. Pick up one and let it go.
Regards
-
Hi
this example is almost what I have done for now. only somehow i've ommited it in qt5 help . i chose to create components in QML and integrate them to QGraphicsScene on C++. it apears that QML is designed so it use GraphicsView framework and it's elements(Items) are derived from c++ clases.
Thanks -
Arsham: Note that Qt Quick 2.0 in Qt 5 is no longer using QGraphicsView or QGraphicsItem. That means the C++ items will eventually have to be ported away from QDeclarativeItem when you want to take advantage of the new improvements. (which is fairly straight forward by using QQuickPaintedItem) Apart from that, using QML for this sounds perfect.
-
thanks for pointing. I have noticed that now as well. I have qml codebase for elemets. now I have to write from scratch the canvas. anyhow I didn't like casting QML QObject to QGraphicsItem in my code.
Thanks for help guys.