Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.12.3
-
None
-
x64
Description
Hi,
I'm trying to implement a QGraphicsView in which the user can move around the scene with the left mouse and zoom (in and out) with the mouse wheel. I also want the scrollbars of the QGraphicsView to be hidden.
To do so, I set the ScrollBarPolicy of the vertical and horizontal scrollbar to ScrollBarAlwaysOff. However, it seems that doing so affects the behaviour of the scale() method: the anchor of the scale is not the center of the view (which is the behaviour I want).
If I restore the ScrollBarPolicy of both scrollbars to the default value, the scale() method works properly, but the translate() method is no longer working and the scrollbars are visible (and would like them to be hidden).
I have attached a Qt project with some source and header files which shows the issue.
Is this behaviour a bug? And if not, could you provide me with a solution to resolve my issue?
Thanks!
Mathieu