[PyQt] Scroll-by-row in QTableView using mouse wheel

Benno Dielmann lists at benno-dielmann.de
Mon Jul 7 19:12:47 BST 2008


On Monday 07 July 2008 Adam Tenderholt wrote:
| Hi Benno,
|
| Have you looked into the ScrollMode and ScrollHint enums? They appear
| to be inherited from QAbstractItemView and might be what you're
| looking for.

Yes I did. ScrollMode works perfectly well - but not for mouse wheel 
scrolling. It influences what happens if you click these arrows on the sides 
of the scrollbar. I'm looking for the equivalent for the mouse wheel... 

BTW, changing the amount of lines to scroll in KDE settings has no effect 
either...

| Adam
|
| On Mon, Jul 7, 2008 at 5:31 AM, Benno Dielmann <lists at benno-dielmann.de> 
wrote:
| > Hi there,
| >
| > I'd like my QTableView to scroll one row at a time when using the mouse
| > wheel. On my KDE 3.5.9 it always scrolls three rows at once.
| >
| > Is there any convenient way I missed to adjust this or do I have to
| > subclass QTableView, catch the MouseWheel event and do the scrolling by
| > myself?
| >
| > Thanks in advance for any hints on this,
| >
| > Benno.
| > _______________________________________________
| > PyQt mailing list    PyQt at riverbankcomputing.com
| > http://www.riverbankcomputing.com/mailman/listinfo/pyqt




More information about the PyQt mailing list