On Thu, 10 Jan 2019 14:21:59 +0000, Kari Oikarinen wrote:

>> True, but Qt/Charts is also QWidgets only.
>> 
> Not quite: https://doc.qt.io/qt-5/qtcharts-qmlchart-example.html

According to https://code.woboq.org/qt5/qtcharts/src/chartsqml2/
declarativechart_p.h.html this is a wrapper around QChart. See the 
private section.

But more important: as far as I can see it creates a QImage with QPainter, 
that it is finally converted to a scene graph node: see 
DeclarativeChart::renderScene.

It's the first time I checked this code, but if I'm right I would say, 
that with Qt/Chart over QML the plot scene is never rendered hardware 
accelerated !

This is actually worse than any other pure widget based solution - 
including Qt/Chart widgets - that could at least take advantage of using 
hardware acceleration over X11 or OpenGL.

Of course the performance of DeclarativeChart could easily be improved by 
adding the option of using QPainter on a FB0 ( or at least using a 
QPixmap, that would help for X11 ). But the fact that this has not been 
done so far makes me believe, that heavy and/or frequently updated plots 
are not considered as being relevant.

Note that being able to create an Image/Pixmap/FBO with QPainter is 
something you find in every plot package - like you can also do this with 
any QGraphicsScene. Wrapping it into a QQuickItem, that converts the 
result into a texture is not much of a deal if you are familiar with the 
Qt/Quick C++ classes.

So what has to be done for binding a plot widget to the scene graph and 
for building a declarative API on top, that can be exposed to QML, is 
more or less the same for any type of plot widget. It's a wrapper around 
the plot classes and therefore no strong argument for not using an 
existing solution.

But anyone who knows better: please correct me if I'm wrong. 

Uwe

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to