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. QTreewidget / QTreeWidgetItem
Forum Update on Monday, May 27th 2025

QTreewidget / QTreeWidgetItem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 942 Views
  • 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.
  • U Offline
    U Offline
    uauaua
    wrote on last edited by
    #1

    Hello,

    at the Moment I'am hanging on a probaly simple Problem.

    In QTreewidget-Object i am Displaying 10 Parents with various number (up to 15) Childs (Sub sections).
    Now I want to select some of them (1..15). Collect these selection for later Processing.

    Has anybody an idea or konw one example?

    Thank you for your Support.

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

      Hi,

      Are you thinking of the functionality provided by "QItemSelectionModel":http://qt-project.org/doc/qt-5/qitemselectionmodel.html ?

      Hope it helps

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

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prady_80
        wrote on last edited by
        #3

        You can use selectedItems to get the Items selected and then process them as you want. It will return you all the QTreeWidgetItems that are selected.

        Hope that helps.

        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