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 to populate QTreeWidget like a list?
Forum Updated to NodeBB v4.3 + New Features

How to populate QTreeWidget like a list?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k 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.
  • M Offline
    M Offline
    maybnxtseasn
    wrote on last edited by
    #1

    All i want to do is populate the following QTreeWIdget with a list of games and their version like so

    http://imageshack.us/photo/my-images/705/fhirqd.png/

    Anyone have any advice on how to do this? i tried adding all the QTreeWidgetItem's to a giant QList then add them all at once with the following instruction:

    ui.treeWidget->addTopLevelItems(widgetList);

    but it produced the above result. Any help is greatly appreciated!

    NOTE: also if i should be using list view instead could anyone please let me know how i can adjustable column bar to the top like the QTreeWidget offers?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      How about you use QTableWidget instead then?

      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