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. QTreeView: specify distance between branch image and text/decoration
Forum Updated to NodeBB v4.3 + New Features

QTreeView: specify distance between branch image and text/decoration

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtreeviewstylesc++
3 Posts 2 Posters 752 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.
  • H Offline
    H Offline
    hoafaloaf
    wrote on last edited by
    #1

    Hello! Long time listener, first time caller.

    I've been trying to figure out how to specify the distance between a QTreeView's expand/collapse arrow and the text and/or decoration to its right -- but I haven't been able to figure out the right combination of CSS and code (in my model) to do so.

     |-here-|
    V        parent_item
                 child_item1
                 child_item2
    

    Any pointers would be greatly appreciated!

    JonBJ 1 Reply Last reply
    0
    • H hoafaloaf

      Hello! Long time listener, first time caller.

      I've been trying to figure out how to specify the distance between a QTreeView's expand/collapse arrow and the text and/or decoration to its right -- but I haven't been able to figure out the right combination of CSS and code (in my model) to do so.

       |-here-|
      V        parent_item
                   child_item1
                   child_item2
      

      Any pointers would be greatly appreciated!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @hoafaloaf
      This is probably not it, but have you checked indentation and/or have you read through e.g. https://forum.qt.io/topic/82636/branch-in-qtreeview or https://forum.qt.io/topic/101765/how-to-change-qtreeview-expand-or-collapse-icon-position ?

      H 1 Reply Last reply
      0
      • JonBJ JonB

        @hoafaloaf
        This is probably not it, but have you checked indentation and/or have you read through e.g. https://forum.qt.io/topic/82636/branch-in-qtreeview or https://forum.qt.io/topic/101765/how-to-change-qtreeview-expand-or-collapse-icon-position ?

        H Offline
        H Offline
        hoafaloaf
        wrote on last edited by
        #3

        @JonB

        Thanks for the suggestion, but I did check that out -- it looks like setIndentation()/indentation() only deals with the space to right of the expand/collapse arrow (i.e., the ::branch subcontrol).

        Any other ideas? :)

        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