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. can i use an Icon on the QTreeWidgetItem to simulate the QTreeWidgetItem's defalut small triangle on the left of item which can be expanded?
Forum Updated to NodeBB v4.3 + New Features

can i use an Icon on the QTreeWidgetItem to simulate the QTreeWidgetItem's defalut small triangle on the left of item which can be expanded?

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

    can i use an Icon on the QTreeWidgetItem to simulate the QTreeWidgetItem's defalut small triangle on the left of item which can be expanded?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      No. An item can have both an item icon and the branch indicator, so even if you use an item icon looking like the branch, it will be indented differently.

      You can show any branch icons using stylesheets though. Set up an icon for the proper QTreeView::branchstate. Here's an example.

      1 Reply Last reply
      0
      • O Offline
        O Offline
        opengpu2
        wrote on last edited by opengpu2
        #3

        how to make the smalll triagle visible and clickable of the QTreeWidgetItem, even it does not have a child yet?

        and this link, thank you

        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