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. [SOLVED] QTreeView mark item as expandable
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QTreeView mark item as expandable

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 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.
  • G Offline
    G Offline
    Galbarad
    wrote on last edited by
    #1

    Hi everybody
    I have problem with by treemodel. I have item without child in my tree but I want see it with plus [+]
    because I want to feel it after user click I am implement method canFetchMore that always return true, but it's not help

    thank you for help

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Galbarad
      wrote on last edited by
      #2

      implementation of method
      @bool hasChildren(const QModelIndex &parent);@
      do not help too

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Galbarad
        wrote on last edited by
        #3

        Tree item class should override method childCount

        @int QDBTreeItem::childCount() const {
        return Opened ? childItems.count() : 1;
        }@

        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