Results 1 to 3 of 3

Thread: Something like a line rubber band but that can be diagonal?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Location
    Laval, France
    Posts
    124
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Something like a line rubber band but that can be diagonal?

    Hello,
    I want to do a graphic program with the possibility of drawing a straight line segment by clicking on a point that represents the start, dragging the mouse and releasing it at the other end. Then a line is drawn. So far , I can program this, but to make it super user friendly I would like the look and feel to be like stretching a rubber band, in other words there should be a
    line from the cursor to the start point that is continuously redrawn as the mouse is moved, and that involves erasing the old
    line. All of this needs to be done without flicker. Any suggestions?
    It seems that QrubberBand can draw lines, but they have to be horizontal or vertical.

    Oh, I am aware that there is a graphics scene demo that provides something like this, but I have been avoiding graphics scenes so far because I am worried that the background scene which has thousands of static objects (it's a map of a town with thousands of buildings) might overload the graphics scene. Is my fear justified?

    Thankyou
    Henri
    Last edited by feraudyh; 16th June 2010 at 21:11.

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. QRubberband- Mouse clicked on Rubber band area
    By bismitapadhy in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2010, 08:10
  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. QHeaderView -- diagonal headers?
    By vycke in forum Qt Programming
    Replies: 7
    Last Post: 28th April 2008, 23:54

Tags for this Thread

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.