Fixed wheel event scroll direction for custom QWidgets
This commit is contained in:
parent
c5cdd77fb1
commit
2ce2e5a8a3
|
@ -3411,7 +3411,7 @@ void QAsmView::wheelEvent(QWheelEvent *event)
|
|||
|
||||
if (!numPixels.isNull())
|
||||
{
|
||||
wheelPixelCounter += numPixels.y();
|
||||
wheelPixelCounter -= numPixels.y();
|
||||
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
|
||||
}
|
||||
else if (!numDegrees.isNull())
|
||||
|
@ -3419,7 +3419,7 @@ void QAsmView::wheelEvent(QWheelEvent *event)
|
|||
//QPoint numSteps = numDegrees / 15;
|
||||
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
|
||||
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
|
||||
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
}
|
||||
//printf("Wheel Event: %i\n", wheelPixelCounter);
|
||||
|
||||
|
|
|
@ -1787,7 +1787,7 @@ void QHexEdit::wheelEvent(QWheelEvent *event)
|
|||
|
||||
if (!numPixels.isNull())
|
||||
{
|
||||
wheelPixelCounter += numPixels.y();
|
||||
wheelPixelCounter -= numPixels.y();
|
||||
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
|
||||
}
|
||||
else if (!numDegrees.isNull())
|
||||
|
@ -1795,7 +1795,7 @@ void QHexEdit::wheelEvent(QWheelEvent *event)
|
|||
//QPoint numSteps = numDegrees / 15;
|
||||
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
|
||||
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
|
||||
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
}
|
||||
//printf("Wheel Event: %i\n", wheelPixelCounter);
|
||||
|
||||
|
|
|
@ -1673,7 +1673,7 @@ void QRamSearchView::wheelEvent(QWheelEvent *event)
|
|||
|
||||
if (!numPixels.isNull())
|
||||
{
|
||||
wheelPixelCounter += numPixels.y();
|
||||
wheelPixelCounter -= numPixels.y();
|
||||
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
|
||||
}
|
||||
else if (!numDegrees.isNull())
|
||||
|
@ -1681,7 +1681,7 @@ void QRamSearchView::wheelEvent(QWheelEvent *event)
|
|||
//QPoint numSteps = numDegrees / 15;
|
||||
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
|
||||
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
|
||||
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
}
|
||||
//printf("Wheel Event: %i\n", wheelPixelCounter);
|
||||
|
||||
|
|
|
@ -1137,7 +1137,7 @@ void QTraceLogView::wheelEvent(QWheelEvent *event)
|
|||
|
||||
if (!numPixels.isNull())
|
||||
{
|
||||
wheelPixelCounter += numPixels.y();
|
||||
wheelPixelCounter -= numPixels.y();
|
||||
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
|
||||
}
|
||||
else if (!numDegrees.isNull())
|
||||
|
@ -1145,7 +1145,7 @@ void QTraceLogView::wheelEvent(QWheelEvent *event)
|
|||
//QPoint numSteps = numDegrees / 15;
|
||||
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
|
||||
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
|
||||
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15*8);
|
||||
}
|
||||
//printf("Wheel Event: %i\n", wheelPixelCounter);
|
||||
|
||||
|
|
Loading…
Reference in New Issue