[PyQt] Missing scrollbar signal in QPlainTextEdit?
sundance at ierne.eu.org
Thu Dec 10 15:35:36 GMT 2009
I'm playing around with QPlainTextEdit and having the weirdest bug.
In my application, I've got keyboard shortcuts to scroll the TextEdit up and
down by way of the QScrollBar.triggerAction() method, with arguments of
SliderPageStepSub and SliderPageStepAdd respectively.
I also need to do some stuff when the scrollbar moves, so I bind the
scrollbar's valueChanged() signal to the appropriate method.
It works all fine when the TextEdit is a QTextEdit.
It no longer works when the TextEdit is a QPlainTextEdit.
This is really bizarre, because the signal is emitted just fine when:
- I move the slider around with the mouse;
- I scroll with the mouse wheel;
- I trigger the SliderSingleStepAdd/Sub actions instead (with Single instead
And before you bring up QScrollBar.setTracking, I used it and it doesn't
You will find a test case attached herein. Click the buttons to scroll up and
down. Then do the same with the mouse. Compare.
This is with Qt 4.5.2 and SIP 4.9.1-snapshot-20091015 (the default Ubuntu
Anybody has any idea what's going on there? A Qt bug maybe?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2349 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091210/1ffbd0a7/testcase.py
More information about the PyQt