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. QMouseMoveEvent does not capture all points
Forum Updated to NodeBB v4.3 + New Features

QMouseMoveEvent does not capture all points

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.2k 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.
  • Q Offline
    Q Offline
    qurban_ali36
    wrote on last edited by
    #1

    I am trying to draw a line with QPainter on a QPixmap inside mouseMoveEvent of QLabel
    it works fine when I slowly move the mouse over the label but it draws a zigzag line when i quickly move the mouse. It seems that there is large distance between each pair of two points and the QMouseMoveEvent.pos() functions does not return continuous points.
    How to draw a smooth line on QPixmap?

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      this isn't possible in an event-based system, since you run in an event-loop.
      Did you try in Debug mode? At least in release mode you should receive a better result.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qurban_ali36
        wrote on last edited by
        #3

        I do not use Qt Creator, I am using eclipse, so there is no release or Debug mode.
        I need a solution for this problem, is there any other way to achieve this task, that is to capture all pixels' position under the mouse when the mouse is moved quickly?

        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