Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how i can create a triangle in class QPainterPath path?
Forum Update on Monday, May 27th 2025

how i can create a triangle in class QPainterPath path?

Scheduled Pinned Locked Moved General and Desktop
triangleqpainterpath
3 Posts 2 Posters 1.3k 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.
  • stackprogramerS Offline
    stackprogramerS Offline
    stackprogramer
    wrote on last edited by stackprogramer
    #1

    i can create a rectangle in class QPainterPath by using method addrect;
    my question is it has not addtriangle,how i can create triangle with it??

    thanks for reply.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! You can use void QPainterPath::addPolygon(const QPolygonF &polygon).

      stackprogramerS 1 Reply Last reply
      1
      • ? A Former User

        Hi! You can use void QPainterPath::addPolygon(const QPolygonF &polygon).

        stackprogramerS Offline
        stackprogramerS Offline
        stackprogramer
        wrote on last edited by stackprogramer
        #3

        @Wieland ,nice .......it works ,thanks for reply:)

        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