[英]QTableWidget's horizontal QHeaderViews are suddenly hidden
I'm working on a project that has a lot of tables.我正在做一个有很多表的项目。 I used QTableWidget.我使用了 QTableWidget。 Horizontal headers are visible, verticals are hiddden.水平标题可见,垂直标题隐藏。 I wrote style sheet for one of them, rest of them are just copied from that one.我为其中之一编写了样式表,其余的只是从那个样式表复制而来。 In Qt Designer, everything is alright, but when I run the program, there's not headers on QTableWidgets.在 Qt Designer 中,一切正常,但是当我运行程序时,QTableWidgets 上没有标题。 I checked horizontalHeaderVisible property of every tables, it checked.我检查了每个表的 horizontalHeaderVisible 属性,它检查了。 I don't know why this is happening.我不知道为什么会这样。 It seems bug to me.这对我来说似乎是错误。
I'm using Qt creator v4.13.1.我正在使用 Qt Creator v4.13.1。 In designer, everything is ok as I said.在设计师中,一切都如我所说。 Then I opened all .ui files in notepad, and searched for horizontalHeaderVisible
property.然后我在记事本中打开了所有 .ui 文件,并搜索了horizontalHeaderVisible
属性。 Of course there were many false
values as I expected, then I changed them to true.当然,正如我所料,有很多false
值,然后我将它们更改为true。 Then headers became visible.然后标题变得可见。 It seems bug of Qt creator.这似乎是 Qt 创建者的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.