Important: Please read the Qt Code of Conduct -

Qt6 and Custom QQuickItem - how to use updatePaintNode

  • 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;
      if(!_curve) {

    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?

  • Lifetime Qt Champion


    I guess you are using a QSGGeometry so from the snapshot documentation I would say use the DrawingMode enum.

    Hope it helps

  • Thanks, thats what I was looking for. Yes, I am using QSGGeometry

  • Lifetime Qt Champion

    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 :-)

Log in to reply