Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] QT Swipe-animation to other .ui file
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QT Swipe-animation to other .ui file

Scheduled Pinned Locked Moved General and Desktop
guianimation
6 Posts 2 Posters 3.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    OskarPyke
    wrote on last edited by OskarPyke
    #1

    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,
    Oskar

    EDIT:

    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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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 ?

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OskarPyke
        wrote on last edited by
        #3

        Thank you for your swift response!

        By using the Designer to add the widgets to the stacked widget instead I finally managed to get the whole thing working. Thank you!

        /Oskar

        mrjjM 1 Reply Last reply
        0
        • O OskarPyke

          Thank you for your swift response!

          By using the Designer to add the widgets to the stacked widget instead I finally managed to get the whole thing working. Thank you!

          /Oskar

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @OskarPyke

          Ok, that is super.

          So you slide inside the stacked widget and then just switch index/page?

          1 Reply Last reply
          0
          • O Offline
            O Offline
            OskarPyke
            wrote on last edited by
            #5

            I slide it out of frame , change the current index, QWidget::move() it to the the other side of the screen (out of frame) and then slide it back in with the new index. I might upload a demo to youtube - it looks pretty neat!

            /Oskar

            mrjjM 1 Reply Last reply
            0
            • O OskarPyke

              I slide it out of frame , change the current index, QWidget::move() it to the the other side of the screen (out of frame) and then slide it back in with the new index. I might upload a demo to youtube - it looks pretty neat!

              /Oskar

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @OskarPyke
              Ok, sounds neat.
              Would be cool to see. :)

              ps. please flag it as solved if possible.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved