Logo Search packages:      
Sourcecode: qt4-x11 version File versions

src.gui.kernel.qevent.cpp

//! [0]
        void MyWidget::wheelEvent(QWheelEvent *event)
        {
            int numDegrees = event->delta() / 8;
            int numSteps = numDegrees / 15;

            if (event->orientation() == Qt::Horizontal) {
                scrollHorizontally(numSteps);
            } else {
                scrollVertically(numSteps);
            }
            event->accept();
        }
//! [0]



Generated by  Doxygen 1.6.0   Back to index