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. Fine-tuning branch indicator
Qt 6.11 is out! See what's new in the release blog

Fine-tuning branch indicator

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

    In general, branch indicators behave like this:

    alt text

    I'd like to further fine-tune images inside my branch indicator by TreeViewStyle like this:

    TreeView {
        ...
        style: TreeViewStyle {
            indentation: 25
            branchDelegate: Item {
                visible: true // ** visible
                width: 20
                height: 10
                Image {
                    // I want this image to be visible only if item has children:
                    visible: styleData.hasChildren
                    width: 10
                    height: 10
                    ...
                    source: "images/arrow.png"
                    transform: Rotation {
                        origin.x: 10 / 2
                        origin.y: 10 / 2
                        angle: styleData.isExpanded ? 0 : -90
                    }
                }
                Image {
                    // I want this image to be always visible:
                    visible: true
                    width: 10
                    height: 10
                    ...
                }
            }
        }
        ...
    }
    

    My above visibility setup is NOT taking effect. Am I missing something?

    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