@inspectorG4dget well, i solved but now i have another.
In a PyQt5 app, i have a scrollarea
inside of it i have a QGraphicsView widget.
The problem was that when i start to draw
i got the width and the height of the widget.
and after that i was changed the height.
If the height was too big so scrollarea will be visible, then the width i have fetched was wrong.
This problem was solved by setting a QTimer to get the new width and after that i draw the lines i want.
Now the problem is that if i resize the window the scrollbar is enabled. I don't want that. I want only vertical scrollbar to enabled, and the width i want to scale in the new dimensions.