Qt6 and Custom QQuickItem - how to use updatePaintNode
Solved
QML and Qt Quick
-
Hi,
I am trying to see if I can compile my program under Qt6 beta. I have a custom QQuickItem which uses the updatePaintNode:QSGNode *PlotCurve::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) { QSGNode * mainNode = oldNode; if(!mainNode) { mainNode = new QSGNode; } if(!_transformNode) { _transformNode = new QSGTransformNode; mainNode->appendChildNode(_transformNode); } if(!_curve) { _geometry->setLineWidth(_curve_width); _geometry->setDrawingMode(GL_LINE_STRIP);
so the above code breaks due to the GL_LINE_STRIP which it cannot find. This sounds reasonably as Qt doesn't use OpenGL directly now. How would this be done in Qt6 with their new hardware abstraction layer?
-
Hi,
I guess you are using a QSGGeometry so from the snapshot documentation I would say use the DrawingMode enum.
Hope it helps
-
Great then please mark the thread as solved using the "Topic Tools" button or the three doted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)