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. ListView Update Data
Qt 6.11 is out! See what's new in the release blog

ListView Update Data

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 683 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    hi i am using list view, when my data is updated, my list slips a little. How can I fix it?

    DiracsbracketD 1 Reply Last reply
    0
    • ? A Former User

      hi i am using list view, when my data is updated, my list slips a little. How can I fix it?

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by Diracsbracket
      #2

      @NullByte
      Could it have something to do with the current index being modified when you change the model data? Something in the vein of:
      https://forum.qt.io/topic/102039/listview-goes-up-when-model-updated

      ? 1 Reply Last reply
      0
      • DiracsbracketD Diracsbracket

        @NullByte
        Could it have something to do with the current index being modified when you change the model data? Something in the vein of:
        https://forum.qt.io/topic/102039/listview-goes-up-when-model-updated

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @Diracsbracket this did not work for me I am doing the same operations but strangely going in different directions

        ListView {
        ...
                onContentYChanged: {
                    if(contentY > 0) {
                        savedY = contentY
                        console.log(savedY)
                    }
                }
        
                onModelChanged: {
                    contentY = savedY
                }
        }
        

        Result (Video)

        https://streamable.com/vm2z51

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Anyone have idea?

          1 Reply Last reply
          0
          • GabrielRRG Offline
            GabrielRRG Offline
            GabrielRR
            wrote on last edited by
            #5

            Hello,

            Did you check if you are getting a binding loop when the slip occurs?

            Lic-Ing. Jose Gabriel Lopez Villalobos
            Embedded Software Engineer
            RidgeRun Engineering Ltd.
            www.ridgerun.com
            Email: gabriel.lopez@ridgerun.com

            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