Unsolved Scroll area does not come back up
-
I created a form that has many fields and so I needed to put them in a scroll area.
When the code focuses on the fields at the bottom of the scroll area, the scroll bar will drop down to the area where the field is (this is normal). However, when the code plays the first focus field from the top, the scroll bar does not come back up.
That is, the first field has focus, but I can't see it because the scrollbar is still at the bottom of the scroll area.
I tried to find some information in the QT documentation. I tried some commands (I don't remember which ones), but they didn't work. @mrjj
Can someone help me please?
-
Hi,
One way would be to use an event filter and on the focus in event call ensureWidgetVisible on with the concerned widget.
-
@SGaist Hi!
I didn't quite understand what you said.
However, I believe the problem is not in the events.
I need a command that makes the scroll area move up or down.
Does this command exist?
-
@SGaist Correcting:
I need a command that moves the inside of the scroll area so that through the code I can make the fields go up or down.
-
That's the idea when using ensureWidgetVisible.