PyQt:删除不必要的列 [英] PyQt: removing unnecessary columns
本文介绍了PyQt:删除不必要的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将QTreeView与QFileSystemModel一起使用.它显示我不需要的列,例如大小,类型,修改日期.如何从视图中删除它们?我在模型或视图中找不到任何removeColumn
.
I am using QTreeView with QFileSystemModel. It displays columns like Size, Type, Modification Date, which I don't need. How can I remove them from the view? I can't find any removeColumn
in model or in view.
推荐答案
获取 hideSection
Get the QHeaderView
of your TreeView by calling header() on it, the headerview knows about the columns and can hide them via hideSection
这篇关于PyQt:删除不必要的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文