Do this : QTreeView::item { border: 0.5px ; border-style: solid ; border-color: lightgray ;} 