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:
parent
d5e62f8169
commit
6bbaeefb90
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user