Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt6 and Custom QQuickItem - how to use updatePaintNode
Forum Updated to NodeBB v4.3 + New Features

Qt6 and Custom QQuickItem - how to use updatePaintNode

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 417 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maxwell31
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        maxwell31
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved