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. Getting 2nd point on QWidget after a mousePress.
Qt 6.11 is out! See what's new in the release blog

Getting 2nd point on QWidget after a mousePress.

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

    Hi,

    I have a mouse press event, which I have implemented so far. But want to know how to make it so that I can find where the user has clicked and dragged the cursor to. For example, to draw a line from point to point. I'm currently working on a Custom QWidget.

    Thanks.

    Pl45m4P 1 Reply Last reply
    0
    • J jkwok678

      Hi,

      I have a mouse press event, which I have implemented so far. But want to know how to make it so that I can find where the user has clicked and dragged the cursor to. For example, to draw a line from point to point. I'm currently working on a Custom QWidget.

      Thanks.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @jkwok678

      There is no "2nd point". You have to use the mouseRelease position or the current mouse position after clicking.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved