Re: QSplitter/SplitterMoved
Quote:
Originally Posted by
MrGarbage
My problem is determining where the vertical scrollbar
has moved.
Catching the splitterMoved Signal only tells me the
new position. Hiding or Showing one of the buttons
results in a resizeEvent for the XMLtree and another
splitterMoved Signal call with the new position.
So your problem seems to be not where the vertical scrollbar has moved, but how it has been moved (using mouse or programmatically).
The easiest method seems to be to check the mouse cursor position and probably button state; if it's on the splitter and the button is down, the splitter has been moved by mouse; otherwise by program.
More reliable method is to reimplement void mousePressEvent() and mouseReleaseEvent() in your splitter subclass to set some kind of variable regarding current mouse position, and check this variable in your splitterMoved() handler.
If it's not what you want, could you please elaborate?
Re: QSplitter/SplitterMoved
One idea could be to try putting those buttons inside a simple wrapper widget. This wrapper widget would simply show/hide the buttons accordingly in its resizeEvent(). This way you wouldn't have to rely on the signal at all...