PDA

View Full Version : QHeaderView sectionReleased(int)



RolandHughes
25th February 2015, 20:42
Am I the only one to find it quite odd QHeaderView has sectionPressed(int) and sectionClicked(int) but no sectionReleased(int)? The infuriating part is sectionClicked(int) gets emitted even when the user has not released the section making "press&hold" type functionality only implementable via subclassing.

Qt 4.8.x

Is that really the only work around?:confused:

d_stranz
25th February 2015, 22:57
"Press & hold" is used when headers are movable, so this behavior is handled internally to the widget. You can always add an event filter on the header view instance to intercept the mouse events you want to modify if the signals don't suit your needs.