为什么 QTreeWidget 的顶部有一个 1?

发布于 2024-12-29 05:24:54 字数 36 浏览 5 评论 0 原文

QtreeWidget 的顶部有一个 1。我该如何修复它?

There is a 1 at the top of a QtreeWidget. How do i fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

明天过后 2025-01-05 05:24:54

1columncount 属性,默认情况下采用该值。

你的问题问得不是很清楚。

如果要修改标签,可以使用 setHeaderLabel/setHeaderLabels 函数。

如果你想隐藏标签,可以使用 setHeaderHidden< /a> 函数。

请在提问之前使用 Qt 文档

The value 1 is the columncount property, that, by default, assumes that value.

Your question was not very clear.

If you want to modify the label, you can use setHeaderLabel/setHeaderLabels functions.

If you want to hide the label, you can use setHeaderHidden function.

Please, before ask, use the Qt documentation.

蓝眸 2025-01-05 05:24:54

默认情况下,qt 设计器将 1 放在那里,您需要在 qt 设计器中编辑它以满足您的需要,或者以编程方式使用文档。

By default qt designer puts 1 there, you need to edit it to suit your need from within qt designer or programatically using the docs.

べ繥欢鉨o。 2025-01-05 05:24:54

这将更改 qlistwidget 的标题:

self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("Dialog", "xyz", None, QtGui.QApplication.UnicodeUTF8))

This wll change the title of qlistwidget:

self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("Dialog", "xyz", None, QtGui.QApplication.UnicodeUTF8))

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文