QTableWidget列调整大小事件 [英] QTableWidget column resize event
本文介绍了QTableWidget列调整大小事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道QTableWidget的列是否正在通过鼠标调整大小.每当调整任何列的大小时如何发出信号?
解决方案
列的大小调整由水平的 QHeaderView
执行.通过调用 QTableWidget :: horizontalHeader()const
对其进行访问,而您感兴趣的信号是 QHeaderView :: sectionResized(int logicalIndex,int oldSize,int newSize)
./p>
I want to know whether a column of a QTableWidget is being resized by mouse. How can I emit a signal whenever any of the columns is resized?
解决方案
Column resizing is performed by the horizontal QHeaderView
. Access it by calling QTableWidget::horizontalHeader() const
, and the signal you are interested in is QHeaderView::sectionResized(int logicalIndex, int oldSize, int newSize)
.
这篇关于QTableWidget列调整大小事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文