Results 1 to 6 of 6

Thread: Updating of view instead of full model's data repainting

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015
    Posts
    22
    Thanks
    23
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Updating of view instead of full model's data repainting

    Hello everyone.

    I have a model subclassed from QAbstractItemModel and QTableView (or another derivant of QAbstractItemView). Model catches lots of data that arrives very frequently (e.g. one data entry for every 10ms).

    So the questions are:

    1. Does view repaint all model's entries from scratch on every model update by default?
    2. If answer of first question is "yes", is there any proper way to update shown data or paint only visible data instead of full repainting?

    My first thoughts of it were making some delay in model and implementing delegate. Delay of repainting was useless because even one iteration of full repainting lasts for critical time when there is a lot of data accumulated (i.e. time of full repainting becomes longer than time elapsed between two updatings of model).

    So I thought about delegate. Thus next bunch of questions is:

    3. Is there any proper way to check visibility of obtained data with delegate? (I figured out that proper implementation of delegate defines methods of repainting and intercommunications of model and view but not certain data selection, am I right about it?)

    4. If all of my thougts are completely wrong does solution of that issue exists at all?

    Thanks in advance.

    P.S. Are specified tags for this thread correct and sufficient?

    ==========

    Update: at the moment I found this example of handling big data sets with ModelViews: http://doc.qt.io/qt-5/qtwidgets-item...e-example.html
    Last edited by Toniy; 21st January 2016 at 08:38. Reason: posible solution has been found

Similar Threads

  1. Replies: 8
    Last Post: 16th July 2015, 19:44
  2. Replies: 3
    Last Post: 21st March 2013, 22:23
  3. Replies: 1
    Last Post: 11th July 2012, 22:46
  4. Replies: 1
    Last Post: 8th June 2011, 14:13
  5. QGraphicsView, OpenGL and repainting/updating
    By Amargedon in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2009, 12:03

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