Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Load items when that need
Forum Updated to NodeBB v4.3 + New Features

Load items when that need

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 5 Posters 1.6k 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.
  • M Offline
    M Offline
    maxim.prishchepa
    wrote on last edited by
    #1

    Hello All!
    I Have a model with a lot of items, and have a view based at QML. Currently all of items load when view is show, how i can say to view so it MUST load ONLY displayed items?
    tnx a lot 4 answers!

    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
      s.frings74
      wrote on last edited by
      #2

      What exactly is an item? A video clip, an image, a sound file, or what else?

      1 Reply Last reply
      0
      • jeremy_kJ Offline
        jeremy_kJ Offline
        jeremy_k
        wrote on last edited by
        #3

        Try the QML "Loader":http://qt-project.org/doc/qt-5/qml-qtquick-loader.html type.

        Asking a question about code? http://eel.is/iso-c++/testcase/

        1 Reply Last reply
        0
        • GianlucaG Offline
          GianlucaG Offline
          Gianluca
          wrote on last edited by
          #4

          Also take a look at ListView and StackView. They automatically loads the item when need

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxim.prishchepa
            wrote on last edited by
            #5

            from model take a path to image and description text. and when view begin construct all of images load to the memory (it's a lot of expensive in my mind..).

            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
            • M Offline
              M Offline
              maxim.prishchepa
              wrote on last edited by
              #6

              [quote author="Gianluca" date="1403299369"]Also take a look at ListView[/quote]

              I use a ListView

              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
              • jeremy_kJ Offline
                jeremy_kJ Offline
                jeremy_k
                wrote on last edited by
                #7

                [quote author="Maxim Prishchepa" date="1403596627"][quote author="Gianluca" date="1403299369"]Also take a look at ListView[/quote]

                I use a ListView[/quote]

                I think we're coming at this from different understandings of the problem. It might help if you can provide a concise example.

                Asking a question about code? http://eel.is/iso-c++/testcase/

                1 Reply Last reply
                0
                • p3c0P Offline
                  p3c0P Offline
                  p3c0
                  Moderators
                  wrote on last edited by
                  #8

                  Hi,

                  Is you model c++ based ? And you have subclassed QAbstractListModel or QAbstractItemModel ?

                  157

                  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