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. Drawing dashed line in QQuickPaintedItem
Forum Updated to NodeBB v4.3 + New Features

Drawing dashed line in QQuickPaintedItem

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 258 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
    manny_lp
    wrote on last edited by
    #1

    Hi,

    I am drawing line using QQuickPaintedItemfrom a series of points : QPointF points[2000]; I want to draw dashed line for some portion of these 2000 points.
    For example, from 1000-1500 dashed line.
    Any suggestions?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Well, divide your work into 3 separate parts:

      • draw the first part using normal line
      • draw the middle bit using dashed line
      • draw the rest using normal line again.

      To modify line style, use QPen.

      (Z(:^

      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