How to capture resizing of QTreeWidget columns?
I would like to know if the user resizes the columns of a QTreeWidget, but I can't seem to find a way to do this.
I have tried using the itemPressed/Clicked/etc signals in the QTreeWidget, but clicking the headerItem obviously doesn't cause these signals to be emitted.
I have also tried to capture the mouseRelease events on both the QTreeWidget widget directly, and its viewport, but neither seem receive the Release event when clicking the header.
Does anyone know how I could do this?
Re: How to capture resizing of QTreeWidget columns?
I am not sure but i think it can be done in the following way.
In the mousePressEvent you should find which column is being pressed using columnViewportPosition(int column) and probably store the columnWidth somewhere.
In the mouseReleaseEvent you can compare the widths and then emit a signal.
Re: How to capture resizing of QTreeWidget columns?