我正在尝试将tableWidget
列自动调整到tableWidget
的可用区域
目前我的布局如下图所示。可以看出,右边没有多余的空白,我想在四列之间均匀地填充
将horizontalHeaderStretch
设置为True
(如下所示)不是我想要的。这会不均匀地拉伸最后一列
我试着将sizeAdjustPolicy
设置为AdjustToCOntents
,但没有看到明显的区别
类似的问题可以在here中找到,但是我找不到任何关于如何直接从设计师那里做到这一点的内容
对如何做到这一点有什么建议吗?提前谢谢
Tags:
您指定的功能无法使用Qt Designer完成。在Qt Designer中,只能修改可设计标志启用的Q\u属性,但是
setSectionResizeMode()
不是Q\u属性,而是QHeaderView的方法,在docs中指出:因此,您必须以编程方式进行:
相关问题 更多 >
编程相关推荐