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 a polygon and image in qml rectangle
Forum Updated to NodeBB v4.3 + New Features

How to paint a polygon and image in qml rectangle

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 322 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by JoeCFD
    #1

    I can paint a polygon, not sure how to paint the image. If I set an image inside rectangle, the polygon may not be displayed. The polygon is painted in Canvas. Maybe it is better to paint the two on Canvas.

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      https://qmlbook.github.io/ch09-canvas/canvas.html helps

      1 Reply Last reply
      0
      • fcarneyF Offline
        fcarneyF Offline
        fcarney
        wrote on last edited by
        #3

        I had a bunch of canvas stuff that I moved to Shape instead. I like Shape as I can make most of the code declarative like the rest of QML.

        C++ is a perfectly valid school of magic.

        JoeCFDJ 1 Reply Last reply
        1
        • fcarneyF fcarney

          I had a bunch of canvas stuff that I moved to Shape instead. I like Shape as I can make most of the code declarative like the rest of QML.

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          @fcarney Thanks for the info. I think that Qt 6 book has Shapes chapter. I will have peek at it. Great work!

          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