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. How to code a loading'.' '..' '...' page that redirects to another ui after 2 seconds?
QtWS25 Last Chance

How to code a loading'.' '..' '...' page that redirects to another ui after 2 seconds?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 5 Posters 367 Views
  • 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.
  • I Offline
    I Offline
    itsnotaron
    wrote on 20 Mar 2020, 00:39 last edited by
    #1

    I am extremely new to qt designer and python.
    I have made a UI page that will appear when you open the application. I want the UI page to have an animated "loading..." where the dots change every 0.5 seconds. I want this page to automatically change to my other UI page after 2 seconds of waiting.

    How would I code that? And where would I put that code?

    Thanks so much,

    Aaron

    J J 2 Replies Last reply 20 Mar 2020, 05:50
    0
    • I itsnotaron
      20 Mar 2020, 00:39

      I am extremely new to qt designer and python.
      I have made a UI page that will appear when you open the application. I want the UI page to have an animated "loading..." where the dots change every 0.5 seconds. I want this page to automatically change to my other UI page after 2 seconds of waiting.

      How would I code that? And where would I put that code?

      Thanks so much,

      Aaron

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Mar 2020, 05:50 last edited by
      #2

      @itsnotaron Sounds like you need https://doc.qt.io/qt-5/qprogressdialog.html
      Or https://doc.qt.io/qt-5/qprogressbar.html depending on how you want to do this.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      5
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 20 Mar 2020, 07:16 last edited by
        #3

        Hi and welcome to devnet,

        Out of curiosity, why impose that 2 seconds delay to your user ?

        Based on your description it's not really justified.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        I 1 Reply Last reply 24 Mar 2020, 03:48
        3
        • I itsnotaron
          20 Mar 2020, 00:39

          I am extremely new to qt designer and python.
          I have made a UI page that will appear when you open the application. I want the UI page to have an animated "loading..." where the dots change every 0.5 seconds. I want this page to automatically change to my other UI page after 2 seconds of waiting.

          How would I code that? And where would I put that code?

          Thanks so much,

          Aaron

          J Offline
          J Offline
          JonB
          wrote on 20 Mar 2020, 08:30 last edited by JonB
          #4

          @itsnotaron
          Apart from what @SGaist says (always heed his advice!).

          In addition to @jsulm , there is also QSplashScreen, https://doc.qt.io/qt-5/qsplashscreen.html if you specifically intend during application startup. You can change message on it dynamically. I'm sure it's the same principle as QProgresss....

          1 Reply Last reply
          3
          • S SGaist
            20 Mar 2020, 07:16

            Hi and welcome to devnet,

            Out of curiosity, why impose that 2 seconds delay to your user ?

            Based on your description it's not really justified.

            I Offline
            I Offline
            itsnotaron
            wrote on 24 Mar 2020, 03:48 last edited by
            #5

            @SGaist For an assignment I have, I need to make a (fake, but) realistic looking application. I proposed a loading page, so I want to follow through with that.
            I don't need a loading page, but to make it more realistic/to get more marks, I want to add a 2 second loading page.

            P 1 Reply Last reply 24 Mar 2020, 04:13
            0
            • I itsnotaron
              24 Mar 2020, 03:48

              @SGaist For an assignment I have, I need to make a (fake, but) realistic looking application. I proposed a loading page, so I want to follow through with that.
              I don't need a loading page, but to make it more realistic/to get more marks, I want to add a 2 second loading page.

              P Online
              P Online
              Pl45m4
              wrote on 24 Mar 2020, 04:13 last edited by Pl45m4
              #6

              @itsnotaron said in How to code a loading'.' '..' '...' page that redirects to another ui after 2 seconds?:

              I don't need a loading page, but to make it more realistic/to get more marks, I want to add a 2 second loading page.

              You can make a fake loading screen, which simulates loading some stuff by using a QTimer which will increase the QProgressBar by some value.

              Skip the "task" - part. Just make the timer consecutively increase your progress by some amount of steps or some value or percentage
              https://doc.qt.io/qt-5/qprogressdialog.html#details


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              2

              1/6

              20 Mar 2020, 00:39

              • Login

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