Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Scroll Area and Widgets repaint
Forum Updated to NodeBB v4.3 + New Features

Scroll Area and Widgets repaint

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sVirgo
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      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 :-(

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sVirgo
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          [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.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sVirgo
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

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

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved