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. QQuickPaintedItem calling both updatePaintNode and paint
Forum Updated to NodeBB v4.3 + New Features

QQuickPaintedItem calling both updatePaintNode and paint

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 357 Views
  • 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.
  • D Offline
    D Offline
    DBoosalis
    wrote on last edited by
    #1

    Hi.

    I am trying to use the best of both worlds: using updatePaintNode to draw all but text onto my QuickPaintItem, and call its paint method to place text on the screen. (I am doing this as I do not know how to draw text with the opengl inside updatePaintNode, examples welcomed)

    If I comment out updatePaintNode method. The painter gets called and everything okay. To get paint() method called I call at the end of my updatePaintNode

    QQuickPaintedItem::updatePaintNode(oldNode,data);
    

    This results in painter getting called but nothing shows up on the screen. Also, if I resize the screen it core dumps.

    Is this considered bad practise to paint with opengl and use a Painter inside paint.

    Any advise on how to get what is drawn with painter(inside paint() method) to show up with updatePaintNode is much appreciated. As are suggestions for best practises.

    Thanks in advance for any help you can provide.

    -David

    1 Reply Last reply
    0
    • oria66O Offline
      oria66O Offline
      oria66
      wrote on last edited by
      #2

      Did you check out the Nano painter Library? It uses the best of both approaches...

      The truth is out there

      1 Reply Last reply
      0

      • Login

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