Fix typos of QWheelEvent example

Just fixed typos with event and numPixels.

Change-Id: I8191d7e812ae9d3975a142d198d709d4f9f85b7f
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Ivan Romanov 2013-10-05 18:19:11 +06:00 committed by The Qt Project
parent d5e62f8169
commit 6bbaeefb90

View File

@ -41,11 +41,11 @@
//! [0]
void MyWidget::wheelEvent(QWheelEvent *event)
{
QPoint numPixels = envent->pixelDelta();
QPoint numDegrees = envent->angleDelta() / 8;
QPoint numPixels = event->pixelDelta();
QPoint numDegrees = event->angleDelta() / 8;
if (!numPixels.isNull()) {
scrollWithPixels(numpixels);
scrollWithPixels(numPixels);
} else if (!numDegrees.isNull()) {
QPoint numSteps = numDegrees / 15;
scrollWithDegrees(numSteps);