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. Get data in Textfield from ListView delegate
Forum Updated to NodeBB v4.3 + New Features

Get data in Textfield from ListView delegate

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 3.2k Views 3 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on 18 Jan 2012, 06:45 last edited by
    #1

    I'm a newbie developer so my question might be a bit stupid here :(

    I using ListView with TextField in delegate. So when the user edit the textfield how can I get this value for each delegate instance? I want this value of each instance to sync with a QML element properties

    1 Reply Last reply
    0
    • T Offline
      T Offline
      task_struct
      wrote on 18 Jan 2012, 08:14 last edited by
      #2

      Hi,

      In ListView's delegate you can access ListModel and use "ListModel::set":http://doc.qt.nokia.com/4.7-snapshot/qml-listmodel.html#set-method or "ListModel::setProperty":http://doc.qt.nokia.com/4.7-snapshot/qml-listmodel.html#setProperty-method

      "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

      • Linu...
      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on 18 Jan 2012, 09:13 last edited by
        #3

        [quote author="task_struct" date="1326874475"]Hi,

        In ListView's delegate you can access ListModel and use "ListModel::set":http://doc.qt.nokia.com/4.7-snapshot/qml-listmodel.html#set-method or "ListModel::setProperty":http://doc.qt.nokia.com/4.7-snapshot/qml-listmodel.html#setProperty-method[/quote]

        Thanks! Never thought it was just easy :P

        1 Reply Last reply
        0
        • E Offline
          E Offline
          eswar
          wrote on 22 Oct 2016, 11:10 last edited by
          #4

          Hi

          I also have same doubt. But the links are not working. please update the links to provide the topic more clear.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            p3c0
            Moderators
            wrote on 22 Oct 2016, 12:16 last edited by p3c0
            #5

            @eswar This is a very old post. There is very little chance if OP would read it and revert back. In such case, always create a new post just giving some reference. The links are dead because that domain doesn't exist. The Qt documentation is moved to new site: http://doc.qt.io
            Anyway here are all those methods:
            http://doc.qt.io/qt-5/qml-qtqml-models-listmodel.html#methods

            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