Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Drawing a rectangle selection box on QImage using Mouse?
QtWS25 Last Chance

Drawing a rectangle selection box on QImage using Mouse?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qt 5mouseeventrectangles
2 Posts 2 Posters 4.0k 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.
  • M Offline
    M Offline
    MarKS
    wrote on 21 Nov 2015, 14:42 last edited by
    #1

    I want to draw a rectangle on a QImage that is displayed on a QLabel using Mouse.
    I am using Mouse events as SIGNALS in a separate class of my_qlabel.
    But then i don't know how to get these mouse event work for drawing a selection box on the image. And after drawing the selection box i want the image to be cropped to the size of the rectangle.
    Need help.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 21 Nov 2015, 21:27 last edited by
      #2

      Hi,

      QRubberBand might be of interest in your case.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      1/2

      21 Nov 2015, 14:42

      • Login

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