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. Curve editor, compare QGraphicsPathItem and the demo pathstroke.

Curve editor, compare QGraphicsPathItem and the demo pathstroke.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 678 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.
  • O Offline
    O Offline
    opengpu
    wrote on last edited by
    #1

    i want to implement a curve editor like qwt, but also i want scale the whole view, and the control points of the curve are drawn and they can be moved, inserted, and deleted.
    now i have 2 ways to do this.

    1. i found the demo pathstroke, it use the QWidget, and the control points can be moved.
      the question is how to scale it, is it easy for the curves in the QWidget? and in mousePressEvent all the points are iterated to find the pressed point, so it's bad when there are not only 1 lines there, and is there any way better for this?

    2. use the QGraphicsView/Scene, i customize a child class from QGraphicsPathItem. it's easy to scale.
      and i want to draw the control points in its paintEvent func. and move them will be implemented in the QGraphicsView's mouseEvent func.
      should this work fine?

    finally, i want to know which one is the better way to realize the curve editor as i descibed
    thank you

    1 Reply Last reply
    0
    • O Offline
      O Offline
      opengpu
      wrote on last edited by
      #2

      no replys?
      thanks for all

      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