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. Not getting expand and collapse icons in treeview - Mac
Forum Updated to NodeBB v4.3 + New Features

Not getting expand and collapse icons in treeview - Mac

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

    Hi, I am not getting expand/collapse icon in tree view on Mac. Windows it works fine. I am using the below settings and also copied the icons in my .app/contents./Macos and resources folders.
    Looks like I am missing something.
    qss file settings:
    Settings:QTreeView {
    show-decoration-selected: 1;
    border: none;
    }

    QTreeView::item {
    border: 1px solid transparent;
    border-top-color: transparent;
    border-bottom-color: transparent;
    }

    QTreeView::item:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #50667c, stop: 1 #50667c);
    border: 1px solid #50667c;
    }

    QTreeView::item:selected {
    border: 1px solid #50667c;
    }

    QTreeView::item:selected:active{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #50667c, stop: 1 #50667c);
    }

    QTreeView::item:selected:!active {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #50667c, stop: 1 #50667c);
    }

    QTreeView::branch:selected:active{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5a5a5a, stop: 1 #5a5a5a);
    }

    QTreeView::branch:selected:!active {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5a5a5a, stop: 1 #5a5a5a);
    }

    QTreeView::branch
    {
    border-image: none;
    }
    QTreeView::branch:has-siblings:!adjoins-item {
    border-image: url(vline.png) 0;
    }

    QTreeView::branch:has-siblings:adjoins-item {
    border-image: url(branch-more.png) 0;
    }

    QTreeView::branch:!has-children:!has-siblings:adjoins-item {
    border-image: url(branch-end.png) 0;
    }

    QTreeView::branch:has-children:!has-siblings:closed,
    QTreeView::branch:closed:has-children:has-siblings {
    border-image: none;
    image: url(branch-closed.png);
    }

    QTreeView::branch:open:has-children:!has-siblings,
    QTreeView::branch:open:has-children:has-siblings {
    border-image: none;
    image: url(branch-open.png);
    }

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Your images are likely not found.

      You can use Qt's Resources system to avoid that kind of issue.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved