Hi, I wanted to make use of QSGRenderNode to paint some QML items using third 
party libraries (mainly Skia). So I decided to gave it a go, but I am having a 
trouble on understanding how to properly use this class. I have wrote a simple 
class derived on QQuickItem that essentially paints a QSGRenderNode using its 
updatePaintNode method.
To paint the node, I am currently using QPainter together with 
QOpenGLPaintDevice, but my code produces unexpected results. Here is an example 
https://pastebin.com/BzMzhu41, where I am trying to create an item that paints 
a line from (0,0) to (400,400).
I would expect this code to create a QML Item  (https://pastebin.com/6ZRrMvFi) 
that paints a line from the top-left towards the bottom right of the item, but 
instead the line seems drawn with an incorrect offset.
I suspect this has something to do OpenGL (on which I am not an expert on), but 
not really sure. Could someone point me in the right direction on how to go 
about this?
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to