Results 1 to 3 of 3

Thread: QRubberband- Mouse clicked on Rubber band area

  1. #1
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default QRubberband- Mouse clicked on Rubber band area

    How can we find that mouse event pressed on Rubberband area?
    I draw two line using rubber band, When mouse event press how can i find mouse clicked or rubber band area or not
    and if clicked on which rubber band out of two?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QRubberband- Mouse clicked on Rubber band area

    I dont think it makes sense to use 2 rubber bands at same time .
    They must be some custom widgets where you want to select some area.
    And when you click on a widget, you get a mousePressEvent in that widget.

  3. #3
    Join Date
    May 2009
    Posts
    94
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QRubberband- Mouse clicked on Rubber band area

    Quote Originally Posted by aamer4yu View Post
    I dont think it makes sense to use 2 rubber bands at same time .
    They must be some custom widgets where you want to select some area.
    And when you click on a widget, you get a mousePressEvent in that widget.
    My requirement is i need to set two rubberband and both are movable and i need to find the difference time between two marker?
    To move the rubber band i need to track is mouse clicked on the rubberband or not?

Similar Threads

  1. How can I implement rubber-band with graphics view items?
    By FinderCheng in forum Qt Programming
    Replies: 6
    Last Post: 14th February 2013, 12:01
  2. Can QRubberBand paint out of clipping area ?
    By topoden in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2010, 13:43
  3. How to draw rubber band using XOR
    By lni in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2009, 12:13
  4. Rubber band artifacts?
    By mooreaa in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2008, 18:19
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.