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. How can i get information about editing items of QTreeView?

How can i get information about editing items of QTreeView?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.8k 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.
  • R Offline
    R Offline
    Ruzik
    wrote on last edited by
    #1

    Hello, i have some QTreeView with QStandardItemModel.
    How can i know witch item of QTreeView or index of QStandardItemModel currently being edited?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jys0224
      wrote on last edited by
      #2

      i think you can get QModelIndex
      thru QTreeView's currentIndex() or
      thru QTreeView's selectionModel() 's features,,

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Ruzik
        wrote on last edited by
        #3

        This functions return selected item/items but the fact that the index is chosen does not mean that it is edited

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          Maybe read the Model/View tutorial. It is very easy to read and includes selection options.
          "ModelView tutorial":http://doc.qt.nokia.com/4.7/modelview.html

          Greetz, Jeroen

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Ruzik
            wrote on last edited by
            #5

            I solved my problem by checking state of my itemView and currentIndex() function.
            Thank you for help!

            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