Results 1 to 4 of 4

Thread: how to apply marching effect to the rubberband rect of the QGraphicsView?

  1. #1
    Join Date
    Apr 2011
    Posts
    39
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default how to apply marching effect to the rubberband rect of the QGraphicsView?

    Hello,
    can anybody tell me how can I apply marching ant effect to the rubberband rectangle of the QGraphicsView Untitled.png?

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to apply marching effect to the rubberband rect of the QGraphicsView?

    when setting pen for drawing rectangle first use QPen::setDashOffset to achieve required effect.

  3. #3
    Join Date
    Apr 2011
    Posts
    39
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to apply marching effect to the rubberband rect of the QGraphicsView?

    first understand my question I want marching ant effect on the rubberband's rectangle that is inbuilt facility of QGraphicsView?

    and actually I dont know how to get the object of the rectangle of the rubberband of the QGraphicsView.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to apply marching effect to the rubberband rect of the QGraphicsView?

    Just set the drag mode:
    QGraphicsView::setDragMode()I don't remember if it will give you a marching ant effect though.
    You could achieve it by using a QTimer in combination with Mareks suggestion.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 2
    Last Post: 22nd April 2011, 13:38
  2. Marching Ant effect at the border of QRect
    By syclopse in forum Qt Programming
    Replies: 4
    Last Post: 18th April 2011, 05:28
  3. Grabbing qrubberband from qgraphicsview rubberband drag
    By grabalon in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2010, 01:15
  4. QGraphicsview RubberBand Drag Mode
    By gopikrishnav in forum Qt Programming
    Replies: 0
    Last Post: 14th December 2009, 06:37
  5. QGraphicsView rubberband selection
    By Vladimir in forum Qt Programming
    Replies: 2
    Last Post: 29th January 2007, 21:21

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.