我有一个小问题,在我的表视图行大小的适当调整。 我有垂直标题,没有水平标题。 我试过了:
self.Popup.table.setModel(notesTableModel(datainput))
self.Popup.table.horizontalHeader().setVisible(False)
self.Popup.table.verticalHeader().setFixedWidth(200)
for n in xrange(self.Popup.table.model().columnCount()):
self.Popup.table.setColumnWidth(n,150)
这个很好,但是当我尝试的时候:
^{pr2}$或者
for n in xrange(self.Popup.table.model().rowCount()):
self.Popup.table.resizeRowToContents(n)
即使文本超出单元格的长度,也不会调整行的大小。在
如何强制行适应数据?在
对我来说,}都按预期工作。以下是我使用的测试脚本:
setRowHeight
和{下面是它的样子:
相关问题 更多 >
编程相关推荐