Results 1 to 6 of 6

Thread: Drawing a variable number of rectangles every x seconds (Dynamic Objects)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2012
    Posts
    22
    Thanks
    1

    Default Re: Drawing a variable number of rectangles every x seconds (Dynamic Objects)

    I have a stream of images on top of which rectangles are shown to mark certain regions/objects. As new regions/objects show up and others disappear, I need to add/destroy rectangles. Technically there is an upper limit to the number of rectangles but I'd rather have them created dynamically.

    At a later point, the user is supposed to be able to interact with the rectangles (click them mostly) so I cannot draw them into the image but need them to be separate objects on top of it.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Drawing a variable number of rectangles every x seconds (Dynamic Objects)

    Quote Originally Posted by xdn View Post
    I have a stream of images on top of which rectangles are shown to mark certain regions/objects. As new regions/objects show up and others disappear, I need to add/destroy rectangles. Technically there is an upper limit to the number of rectangles but I'd rather have them created dynamically.
    You have to remember creating/destroying is always slower than showing/hiding. It's a trade-off decision you have to make.

    As for keeping all the rectangles -- you can create a property that will hold a list of items.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 18th December 2013, 20:02
  2. Drawing rectangles in QT
    By andreahmed in forum Qt Programming
    Replies: 5
    Last Post: 26th February 2012, 19:08
  3. Replies: 1
    Last Post: 19th April 2011, 11:17
  4. Replies: 0
    Last Post: 14th November 2010, 13:36
  5. Replies: 4
    Last Post: 17th January 2006, 17:46

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
  •  
Qt is a trademark of The Qt Company.