Important: Please read the Qt Code of Conduct -

Drawing dashed line in QQuickPaintedItem

  • 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?

  • Moderators

    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.

Log in to reply