[SOLVED] QT Swipe-animation to other .ui file
-
I'm working on an application with a login page and a registration page. All the widgets on the login form have been placed using the design tab in QT creator.
How would I go about animating all widgets on the login at the same time to swipe off to the side and introduce the register page - stored in another ui-file? I tried adding all widgets to a QStackedWidget and animate the "pos" property with a QPropertyAnimation - but every widget I add to it vanishes from the form.
I just can't seem to figure this out - any help is very appreciated!
Kind regards,
OskarEDIT:
PS
Posted another question on the forum over here: https://forum.qt.io/topic/56747/how-to-use-signal-to-execute-any-function-with-arguments
Any thoughts you might have on that are also very appreciated.
/Oskar
-
Hi
Welcome
If you placed a widget (A) on your main form (from "container" category) and inside this widget
you placed 2 other widgets for login and register.
Then make sure that the size of A only shows the Login widget.
Then you idea with QPropertyAnimation could easy Slide Login away and Register into view.
You could also play around with a scroll area.Also if you IU file has Widget as parent, then using the promote feature, you could get the controls from the UIs
directly into the Widget containers inside A. (first shown when run)but every widget I add to it vanishes from the form.
You add them in Creator but when program is run, they are gone, or how do you mean ?
-
Ok, that is super.
So you slide inside the stacked widget and then just switch index/page?
-
@OskarPyke
Ok, sounds neat.
Would be cool to see. :)ps. please flag it as solved if possible.