Hi everybody,
quick Christmas question:

I am trying to re-implement a QScrollBar's wheelEvent to change it's delta but I just can't get it right for some reason. It kinda feels like a bug to me but am not sure (using PySide 1.0.9).

Below is a stripped down version of what I'm trying to do. PageScroller().wheelEvent() never seems to be fired (though the wheel does scroll the bar).
Does anybody have an idea what I'm doing wrong?

Cheers,
frank

class PageScroller(QScrollBar):
    '''Scroll widget for tool page'''

    def __init__(self, parent=None):
        super(PageScroller, self).__init__(parent)

    def wheelEvent(self, event):
        print 'received wheel event'


if __name__ == '__main__':
    def testSlot(i):
        print 'Current index changed:', i

    app = QApplication(sys.argv)
    mainWindow = QWidget()
    layout = QVBoxLayout(mainWindow)
    s = PageScroller(mainWindow)
    layout.addWidget(s)
    mainWindow.show()

    sys.exit(app.exec_())



--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing <http://ohufx.com/index.php/vfx-compositing> | *workflow customisation and consulting <http://ohufx.com/index.php/vfx-customising>* *

_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to