Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Optimization: Simplified ListView
Forum Updated to NodeBB v4.3 + New Features

Optimization: Simplified ListView

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 5 Posters 3.7k 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.
  • O Offline
    O Offline
    overquill
    wrote on last edited by
    #1

    Hi there.

    I want to use QT on a simple hardware, e.g. without opengl or 2d acceleration. Especially the ListView is unbearably slow, both while flicking and by positionViewAtIndex.

    It would be acceptable for me if all items stay put at the same position, only their data is changed while "scrolling", so every scrolling offset could be a multiple of the item's height. That means all displayed Widgets could be reused, and only the portion of each widget that actually changes has to be redrawn.

    Is there a possibility to implement this without coding a new ListView-like type in C++? Say, binding each item indirectly via an offset to the underlying datasource?

    Or if not, how would this new ListView-like class be implemented to offer the same slick delegate-functionality that ListView offers?

    Thanks in advance.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leafaku
      wrote on last edited by
      #2

      I have the same problem before that I set GraphicsSystem to 'raster'

      1 Reply Last reply
      0
      • O Offline
        O Offline
        overquill
        wrote on last edited by
        #3

        I added
        QApplication::setGraphicsSystem("raster");
        as the first line in my Qt-Creator-generated main.cpp. But the Speed stays the same for "native", "raster" or "opengl", so I guess "raster" is the only available GraphicsSystem on my platform. Btw, OS is WinCE 6.0, no additional configure-switches were set.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          So, basically, you want a scroll-by-item instead of a scroll-by-pixel (as is a setting in the widget world)?

          1 Reply Last reply
          0
          • O Offline
            O Offline
            overquill
            wrote on last edited by
            #5

            This would be one effect, yes. But I hoped to gain a performance increase because the Widgets created by the delegate could be reused, only invalidating the part of the screen that really changes. Say the background picture of each item largely stays the same, and only the portion covered by a changed text needs to be redrawn.

            How would scroll-by-item be activated?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              I don't think it is available in ListView (QML component), sorry. QML uses no Widgets. Note that the ListView already recycles the delegates it uses.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gile
                wrote on last edited by
                #7

                If you have some time, flattening the QWidget tree and using regions will do the trick. It definitely is more coding (C++) than using QML but you don't need to make compromises on user experience. ARM9 @ 200MHz with no HW accelerator for graphics can drive WVGA at 30+ FPS.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bkamps
                  wrote on last edited by
                  #8

                  Pff tell me about slow ListViews.. I have the same problem, slow hardware (arm 300mhz, no graphic accelaration). For now I switched off all nice animations (while scrolling through the list). This helps a lot:

                  @
                  ListView {
                  highlightFollowsCurrentItem : true
                  highlightMoveSpeed : 1
                  highlightMoveDuration : 1
                  highlightResizeSpeed : 1
                  highlightResizeDuration : 1
                  }
                  @

                  Also make sure the data retrieval contains no performance issues.

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    overquill
                    wrote on last edited by
                    #9

                    I do not use highlighting... the problem seems to be not slow graphics, but something in the event subsystem goes haywire when pushing the touch-screen. so flicking does not work at all. I have a very simple list with 20 elements, each defining 3 attributes defined in qml for testing purposes. My delegate is just a BorderImage with 3 texts displaying the attributes of each ListElement, but the list is also too slow for flicking when just using one text without background.
                    Moving the entire List by animating the x-property is acceptably fast btw. (as long as the touch is not pressed...), but I guess that only involves blitting a buffer.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gile
                      wrote on last edited by
                      #10

                      You may want to experiment creating a filter for event loop and do gesture detection that way.

                      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