[PyQt] strange scrolling behavior everywhere

David Boddie david at boddie.org.uk
Tue Feb 16 23:47:17 GMT 2010


On Tue Feb 16 13:32:12 GMT 2010, Peter Schmidtke wrote:

> I have several widgets in my MainWindow (desinged with QtDesigner), like a
> QTableView and some QPlainTextEdit, where I enable automatic scrollbars
> (not as seperate widget) if necessary.
> The thing is, when scrolling is needed, scrollbars appear, but the
> scrolling behavior is strange. For instance for my vertical scrollbars when
> you click left with the mouse wherever on the scrollbar it is scrolling
> down. But I can not drag the slider to scroll. Furthermore when you click
> right on it, you have menu, for where to scroll (top, bottom etc..)

This sounds strangely familiar, but is not normal behaviour. What is the
behaviour of the scrollbars when you preview the form in Qt Designer?
(You may have to add some content to the QPlainTextEdit to make sure you
get scrollbars.)

> Is there a way to get a more "normal" behaviour of the scrollbars without
> implementing them as separated widgets and controlling their action by
> "hand", that is to say with in python, by capturing the sliding events
> etc...?

Usually, scrolling should just work "normally". If possible, can you put your
.ui file somewhere for us to take a look at? I'm wondering if there's
something strange in the way these widgets are configured.

By the way, you don't say which platform you are running on, or the versions
of Qt and PyQt you are using. Those pieces of information might also be
helpful in figuring out the cause of the problem.

David


More information about the PyQt mailing list