Headers in Treeview could we remove them?

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Headers in Treeview could we remove them?

Post by MisterMaker »

So what is up with the headers in the treeview?
I kinda feel that it's useless. @realthunder also removed it in his linkstage branch.
Image
I managed to remove it with some qss wizary. But it might and probably breaks something somewhere else that uses Qtreeview?
There is also a boolean and the docs actually say you can disable it but no where it is mentioned about how to do this true qss.
Image
With code:

Code: Select all

QTreeWidget QHeaderView::section {
  background-color: transparent;
  border: 0px solid #696968;
  color: transparent;
  margin: -100%;
}
@chennes
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Headers in Treeview could we remove them?

Post by chennes »

You could submit a PR to switch the default for that preference to "False" (though it won't get reviewed until after 0.21 is released).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
obelisk79
Veteran
Posts: 1062
Joined: Thu Sep 24, 2020 9:01 pm

Re: Headers in Treeview could we remove them?

Post by obelisk79 »

On that same token, what value/use-case is there for the description column? Is it something which could be disabled via a property? It takes up unnecessary screen space in my opinion. I'd rather see that text be applied to a tooltip for treeview items anyway.

Sort of along the same lines of using good naming conventions vs commenting everything in source code. I don't even know how to make entries into the description column (not that I've tried hard).
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Headers in Treeview could we remove them?

Post by adrianinsaval »

+1 for removing the headers and +1 for a preference to show the description on tooltips only
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Headers in Treeview could we remove them?

Post by sliptonic »

obelisk79 wrote: Wed May 24, 2023 2:31 pm On that same token, what value/use-case is there for the description column? Is it something which could be disabled via a property? It takes up unnecessary screen space in my opinion. I'd rather see that text be applied to a tooltip for treeview items anyway.

Sort of along the same lines of using good naming conventions vs commenting everything in source code. I don't even know how to make entries into the description column (not that I've tried hard).
I can't recall ever seeing anything in that column. Let's kill it and see if anyone screams.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Headers in Treeview could we remove them?

Post by adrianinsaval »

I've seen people using it and have done so myself when I felt a feature could use an explanation, that being said it's not worth the lost real state to me. I say make it optional (off by default), and only show the headers when the description column is visible.
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: Headers in Treeview could we remove them?

Post by paddle »

+1 to remove the headers and at least disable description by default.

The root of the tree called "Application" could also be removed. It useless.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Headers in Treeview could we remove them?

Post by MisterMaker »

Description is for label2.
Since it doesn't have the same namr it's even a better reason to remove. Or at least rename it.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Headers in Treeview could we remove them?

Post by sliptonic »

MisterMaker wrote: Wed May 24, 2023 3:45 pm Description is for label2.
Since it doesn't have the same namr it's even a better reason to remove. Or at least rename it.
Label2 as a property is hidden by default. What's it for?
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Headers in Treeview could we remove them?

Post by MisterMaker »

sliptonic wrote: Wed May 24, 2023 3:53 pm
MisterMaker wrote: Wed May 24, 2023 3:45 pm Description is for label2.
Since it doesn't have the same namr it's even a better reason to remove. Or at least rename it.
Label2 as a property is hidden by default. What's it for?
Add a description, pretty usefull actually but not so good implemented, definitely not something that we should hide. I remember I had a discussion about this a while ago. But nothing came out of it.
Post Reply