Results 1 to 20 of 35

Thread: How to threading data in app?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to threading data in app?

    One approach is to register all rectangles with a controller object.
    It runs the timer and on timeout gets the positions from the registered objects and updates the color.

    Another approach is to have a model that gets the number of rectangles as its input and generates as many reference objects.
    Each such object has a read/write for the position and a read property for the color.

    The retangles are then generated using a Repeater, bind their position and color to the given reference object.
    The model then updates each reference object with a timer.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    tanthinh1510 (26th March 2015)

Similar Threads

  1. Threading with rsh and rcp
    By jaxrpc in forum Newbie
    Replies: 2
    Last Post: 4th June 2010, 12:50
  2. Threading...?
    By sekatsim in forum Qt Programming
    Replies: 12
    Last Post: 10th June 2008, 02:14
  3. Qt Threading
    By avh in forum Newbie
    Replies: 7
    Last Post: 30th May 2008, 21:20
  4. I'm failing with Threading
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2008, 20:40
  5. Sub-Threading
    By TheGrimace in forum Qt Programming
    Replies: 4
    Last Post: 7th June 2007, 17:38

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.