One solution would be to output a new class from QScrollArea and re-execute wheelEvent , for example, to scale with the wheel mouse and at the current position of the mouse cursor.
This method works by adjusting the position of the scroll bar accordingly to reflect a new level of scaling. This means that while there is no visible scrollbar, scaling does not occur under the position of the mouse cursor. This is the behavior of most image viewer applications.
void wheelEvent(QWheelEvent* e) { double OldScale = ...
source share