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. How to paint in QML Canvas form C++?
Forum Updated to NodeBB v4.3 + New Features

How to paint in QML Canvas form C++?

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 3.0k 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.
  • P Offline
    P Offline
    pnmrvvtl
    wrote on last edited by
    #1

    I need to paint on QML canvas figure that creates like many lines. I have an array in C++ code that is points of endings of these lines. How i can send this points to QML code and paint on it?Please give me how i can do it, what classes to use or anything else. Thank you.

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Have a look at "Interacting with QML Objects from C++":http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html.

      157

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rolias
        wrote on last edited by
        #3

        I published my third course on Qt this month. The final course is on "Integrating Qt Quick with C++":http://bit.ly/qtquickcpp. Watching it might save you some time. While it's probably not obvious from the table of contents interacting with the Canvas via a C++ class is covered in the 5th module "Registering C++ Types". It might be a little confusing to jump into the middle of the course but I still think you'll find it helpful. Of course I think you should watch the entire course but that's a little self-serving.

        Pluralsight is a subscription site but they have a free ten-day trial (limited to 4 hours) and I also have some VIP passes left. The VIP pass is good for a week but includes the ability to watch unlimited hours during the week, download the course materials, and watch offline (offline content will expire with the pass). If you want a pass, just send me an email through this forum.

        Check out my third course in the trilogy on Qt
        "Integrating Qt Quick with C++"
        http://bit.ly/qtquickcpp
        published by Pluralsight

        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