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. Draw a line follow mouse
Forum Updated to NodeBB v4.3 + New Features

Draw a line follow mouse

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

    Hi, I'm a newbie. I need draw a line with follow mouse in graphic view (or anything) and function save and clear. But mouse event can't active, or wrong. I mistake ui element
    I need help .
    Thank you

    1 Reply Last reply
    0
    • ValentinMicheletV Offline
      ValentinMicheletV Offline
      ValentinMichelet
      wrote on last edited by
      #2

      Hi,

      Do you want the line to be drawn when one mouse button is pressed, or whenever the mouse move?
      Can you be more specific about the exact behavior you try to achieve?

      Meanwhile, you can consult these links:
      http://stackoverflow.com/questions/24672146/qpainter-draw-line
      http://zetcode.com/gui/qt4/painting/

      Also, could you post your code so we can check what might go wrong?

      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