Results 1 to 2 of 2

Thread: How do I clear the rubber band after a selection is done

  1. #1
    Join Date
    Jun 2008
    Posts
    83
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default How do I clear the rubber band after a selection is done

    Hi:

    I making a plotting widget using QGraphicsView Framework and I wanted to add the zooming functionality. I can set the rubberband and get the selected scene area by using the selectedArea().boundingRect() function. However I cannot get the selection square (the one created by the mouse motion) to go away. Even if i call clearSelection() the square remains there. How should I get rid of it?

    Thanks for any help.

  2. #2
    Join Date
    Jun 2008
    Posts
    83
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do I clear the rubber band after a selection is done

    So I found the answer: the box clears on mouse release but since I was reimplementing mouseRelease I forgot to send the event to it's parent (QGraphicsView::mouseReleaseEvent()). That is all problem solved!

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. Replies: 2
    Last Post: 17th June 2010, 13:38
  3. QRubberband- Mouse clicked on Rubber band area
    By bismitapadhy in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2010, 08:10
  4. How to draw rubber band using XOR
    By lni in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2009, 12:13
  5. Rubber band artifacts?
    By mooreaa in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2008, 18:19

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.