Centering ScrollView in the middle of the screen
-
Hello fello Qt Devs,
how does one center ScrollView in the middle of the screen?
I have it as an element of page and tried achors.horizontalCenter: parent.horizontalCenter
anchors.centerIn:
x:
made the text be inside of Column{} and set ScrollViews height to that columns height and even tried to center the Text{} elements of the ScrollView to center of page by its Id, but nothing works. It is either left-aligned or breaks.Should I remove the Page element since it might interfere,k but how then i put buttons that stay in the same location when one scrolls, and I also havent seen ScrollView centered even when its standalone, in tutorial version it was also left-aligned.
Cheers, DSU
-
Keep in mind that when you try to center elements containing text, you also need to align the text itself inside the component (vertical and horizontal alignment).