Hide headers in combo view
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 73
- Joined: Wed Nov 11, 2020 10:43 am
Hide headers in combo view
Hi,
i want to hide the headers in my combo view. Also in the treeview, i only want to have one column.
Is there a setting or a way for me to do this?
i want to hide the headers in my combo view. Also in the treeview, i only want to have one column.
Is there a setting or a way for me to do this?
- Attachments
-
- hide_headers.png (37.22 KiB) Viewed 1434 times
Re: Hide headers in combo view
Code: Select all
from PySide2 import QtWidgets
cvtv = Gui.getMainWindow().findChild(QtWidgets.QDockWidget, 'Combo View').findChildren(QtWidgets.QTreeView)
pttv = Gui.getMainWindow().findChild(QtWidgets.QDockWidget, 'Combo View').findChild(QtWidgets.QTabWidget, 'propertyTab').findChildren(QtWidgets.QTreeView)
for tv in cvtv:
tv.setHeaderHidden(True)
if not tv in pttv:
tv.setColumnHidden(1, True)
-
- Posts: 73
- Joined: Wed Nov 11, 2020 10:43 am
Re: Hide headers in combo view
Thank you openBrain for the quick answer.
With your script i can hide the both headers.
However the header in tree view stays hidden all the time but the one in properties view doesn't not. By selecting any item in tree view or any elements in 3D view, the header in properties view shows up again.
Is there a way to make it persistent?
With your script i can hide the both headers.
However the header in tree view stays hidden all the time but the one in properties view doesn't not. By selecting any item in tree view or any elements in 3D view, the header in properties view shows up again.
Is there a way to make it persistent?
Re: Hide headers in combo view
I don't have this behavior. Please post your full FC version information.
-
- Posts: 73
- Joined: Wed Nov 11, 2020 10:43 am
Re: Hide headers in combo view
Sure, here is my FreeCAD info:
Code: Select all
OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2021.531.24301 +3702 (Git)
Build type: Release
Branch: LinkDaily
Hash: 4ad819f55a108b7e8bddb134d0de39218e662aa4
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
Re: Hide headers in combo view
Looks to me as it is @realthunder's fork. I absolutely don't know what he can have modified that brings this behavior.
My script works fine on the vanilla version.
-
- Posts: 73
- Joined: Wed Nov 11, 2020 10:43 am
Re: Hide headers in combo view
@openBrain:
Thanks for the confirmation on FreeCAD vanilla version. I will ping realthunder about this.
Can you please take a look, why the header of properties view keeps showing up?
Thanks for the confirmation on FreeCAD vanilla version. I will ping realthunder about this.
@realthunder:realthunder wrote:ping
Can you please take a look, why the header of properties view keeps showing up?
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Hide headers in combo view
There are options in Preference -> Display -> UI -> Tree view to 'Hide header' and 'Hide extra column', among others. I didn't put options to hide property header though, because its column is configured as user resizable by default. Hiding the header disables column resizing. I can add extra options for that.ngocminhdao88 wrote: ↑Wed Jun 23, 2021 12:53 pm Can you please take a look, why the header of properties view keeps showing up?
-
- Posts: 73
- Joined: Wed Nov 11, 2020 10:43 am
Re: Hide headers in combo view
@realthunder:
Thanks in advance
Thanks in advance