Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Select a Line with the Mouse

Select a Line with the Mouse

Scheduled Pinned Locked Moved Solved Qt for Python
3 Posts 2 Posters 446 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.
  • J Offline
    J Offline
    JThornton
    wrote on last edited by
    #1

    How do you select a line drawn with a Qpen with the mouse and change the color. Also how do you get the coordinates of the line? And is is possible to select the end point of a line with the mouse?

    jsulmJ 1 Reply Last reply
    0
    • J JThornton

      How do you select a line drawn with a Qpen with the mouse and change the color. Also how do you get the coordinates of the line? And is is possible to select the end point of a line with the mouse?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @JThornton What you describe sounds like you rather should use Qt Graphics View Framework: https://doc.qt.io/qt-5/graphicsview.html
      https://doc.qt.io/qt-5/qgraphicsscene.html

      What you draw with QPainter is just a bunch of pixels - you would have to implement everything by yourself.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • J Offline
        J Offline
        JThornton
        wrote on last edited by
        #3

        Thanks, I'm slowly sorting this out and that information is very helpful.

        JT

        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