Scroll Area and Widgets repaint



  • I have hundreds of widgets added in scroll area.
    I get an update of widget displayed information in every 20 seconds.
    Sometimes I add more widget too on run time.

    Will it slow down the UI if I perform update of information on all widgets.
    Though only 5 widgets are displayed on one page.

    Should I perform update on all widgets or only on the displayed page.
    UI is finger touch and scrolling has to be enabled on finger movement.

    Any suggestions.



  • Hi,

    first of all, if you have hunders of widgets in a scroll view, why don't you use a model/view aproach? Table, List etc.

    Second, if you do it all 20 seconds, I think it should not be a problem. If you only update the visible stuff, you have to take care of all others during scroll operations for refilling them :-(



  • Thank you so much!
    I think then I am good to go because I am doing model/view approach.
    Where I have a separate singleton class which contains data containers and keep updating it.
    Whenever there is change in data containers, it emits a signal to UI Class and it updates information for all widgets.

    When I update all widgets, does it repaints all of them or the displayed page?



  • [quote author="sVirgo" date="1318016313"]Thank you so much!
    I think then I am good to go because I am doing model/view approach.
    Where I have a separate singleton class which contains data containers and keep updating it.
    Whenever there is change in data containers, it emits a signal to UI Class and it updates information for all widgets.
    [/quote]

    If you say you use the MV approach, why dou you have to update multiple widgets? If you cvhange data in a model, you just call emit dataChanged() and it updates the connected views.

    [quote author="sVirgo" date="1318016313"]
    When I update all widgets, does it repaints all of them or the displayed page?
    [/quote]

    AFAIK there is some logic behind repaint, which should clip out invisible widgets.



  • Thank you for reply.

    I am a newbie to QT. I need to check model/view approach again.

    Is there any example which I can look to clip out invisible widgets in repaint, then I even don't need to change my code to model/view.



  • it shopuld be clipped by the base system, so normaly, I would say: nothing to be done here.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.