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. Copy value to QLineEdit after clicking on QListView's line
Qt 6.11 is out! See what's new in the release blog

Copy value to QLineEdit after clicking on QListView's line

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.4k 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.
  • D Offline
    D Offline
    derilshows
    wrote on last edited by
    #1

    Hello!
    I have QListView where are many data. I want to make double click on some line(with value) and this value must to be inserted in QLineEdit.
    Can you help me?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      derilshows
      wrote on last edited by
      #2

      Can anybody help? Please

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Implement a slot that you'll connect to QListView::clicked signal. There you can update the content of the QLineEdit with the content of the clicked row.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        D 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Implement a slot that you'll connect to QListView::clicked signal. There you can update the content of the QLineEdit with the content of the clicked row.

          D Offline
          D Offline
          derilshows
          wrote on last edited by
          #4

          @SGaist please, can you write the code? Because I don't know how to do that... I'll be very grateful

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Did you took a look at the model view programming chapter of Qt's documentation ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              Did you took a look at the model view programming chapter of Qt's documentation ?

              D Offline
              D Offline
              derilshows
              wrote on last edited by
              #6

              @SGaist yes, I have looked at that.

              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