Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Progress bar is not smooth
Forum Updated to NodeBB v4.3 + New Features

Progress bar is not smooth

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qtquickqmlprogress bar
18 Posts 5 Posters 3.8k Views 1 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.
  • D Offline
    D Offline
    dan1973
    wrote on last edited by
    #7

    Try this in xml

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    
    ApplicationWindow {
        id: root
        visible: true
        minimumWidth: 840
        minimumHeight: 600
    
        property real prgVal1:100
    
        function updateProgress(){
                if(prgVal1>0){
                    prgVal1 -= 0.1
                }
                else{
                    prgVal1 = 100
                }
                progressBar1.value = prgVal1
                console.log("prgVal1 = ", prgVal1);
        }
    
    
        Timer{
            id:timProgress
            interval: 10
            running: true
            repeat: true
            onTriggered: {
                updateProgress()
            }
        }
    
    
        ProgressBar{
            id: progressBar1
            visible: true
            width: 600
            height: 60
            x: 20
            y: 50
            value: 100
            from: 0
            to: 100
        }
    
    }
    
    
    W 1 Reply Last reply
    0
    • D dan1973

      Try this in xml

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      
      ApplicationWindow {
          id: root
          visible: true
          minimumWidth: 840
          minimumHeight: 600
      
          property real prgVal1:100
      
          function updateProgress(){
                  if(prgVal1>0){
                      prgVal1 -= 0.1
                  }
                  else{
                      prgVal1 = 100
                  }
                  progressBar1.value = prgVal1
                  console.log("prgVal1 = ", prgVal1);
          }
      
      
          Timer{
              id:timProgress
              interval: 10
              running: true
              repeat: true
              onTriggered: {
                  updateProgress()
              }
          }
      
      
          ProgressBar{
              id: progressBar1
              visible: true
              width: 600
              height: 60
              x: 20
              y: 50
              value: 100
              from: 0
              to: 100
          }
      
      }
      
      
      W Offline
      W Offline
      Witc
      wrote on last edited by
      #8

      @dan1973 said in Progress bar is not smooth:

      import QtQuick 2.15
      import QtQuick.Controls 2.15

      It Still "jumps"... In console the prgVal is correct: 100/99,9/99,8/99,7/99,6....

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dan1973
        wrote on last edited by
        #9

        @Witc said in Progress bar is not smooth:

        It Still "jumps"...

        what is the System configuration of yours: RAM, Processor and OS?

        W 1 Reply Last reply
        0
        • D Offline
          D Offline
          dan1973
          wrote on last edited by
          #10

          I checked it is moving smoothly without breaks or jagging

          1 Reply Last reply
          0
          • D dan1973

            @Witc said in Progress bar is not smooth:

            It Still "jumps"...

            what is the System configuration of yours: RAM, Processor and OS?

            W Offline
            W Offline
            Witc
            wrote on last edited by
            #11

            @dan1973 said in Progress bar is not smooth:

            @Witc said in Progress bar is not smooth:

            It Still "jumps"...

            what is the System configuration of yours: RAM, Processor and OS?

            Now I tried the same app on my friends PC (Ubuntu)- and it works great.
            On my Windows 10, Dell, intel i7, 16GB RAM it is jagging

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dan1973
              wrote on last edited by
              #12

              @Witc said in Progress bar is not smooth:

              On my Windows 10, Dell, intel i7, 16GB RAM it is jagging

              your config above is Good Enough. Normally Qt requires min 4GB and 16GB will be enough to run any graphics. when you say intel i7 what's the processor speed.

              You should check if any background process keeps windows busy in providing priority to your app. normally windows OS guarantees for more than 20ms.

              if its over please mark solved. or any questions you can ask?

              W 1 Reply Last reply
              0
              • D dan1973

                @Witc said in Progress bar is not smooth:

                On my Windows 10, Dell, intel i7, 16GB RAM it is jagging

                your config above is Good Enough. Normally Qt requires min 4GB and 16GB will be enough to run any graphics. when you say intel i7 what's the processor speed.

                You should check if any background process keeps windows busy in providing priority to your app. normally windows OS guarantees for more than 20ms.

                if its over please mark solved. or any questions you can ask?

                W Offline
                W Offline
                Witc
                wrote on last edited by
                #13

                @dan1973 said in Progress bar is not smooth:

                if its over please mark solved. or any questions you can ask?

                unfortunatelly I have no idea how to solve it on my Computer, @ndias has the same problem as me, so ther is probably some bug in some verision of Qt? Python?....

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dan1973
                  wrote on last edited by dan1973
                  #14

                  @Witc said in Progress bar is not smooth:

                  probably some bug in some verision of Qt?

                  which Qt version r u using? and which compiler?

                  W 1 Reply Last reply
                  0
                  • D dan1973

                    @Witc said in Progress bar is not smooth:

                    probably some bug in some verision of Qt?

                    which Qt version r u using? and which compiler?

                    W Offline
                    W Offline
                    Witc
                    wrote on last edited by
                    #15

                    @dan1973 said in Progress bar is not smooth:

                    @Witc said in Progress bar is not smooth:

                    probably some bug in some verision of Qt?

                    which Qt version r u using? and which compiler?

                    QT 6.3.1: 512b515f-437e-4470-8a0d-0a289634780e-image.png

                    jsulmJ 1 Reply Last reply
                    0
                    • W Witc

                      @dan1973 said in Progress bar is not smooth:

                      @Witc said in Progress bar is not smooth:

                      probably some bug in some verision of Qt?

                      which Qt version r u using? and which compiler?

                      QT 6.3.1: 512b515f-437e-4470-8a0d-0a289634780e-image.png

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      @Witc This does not answer the question which compiler you're using as you installed Qt for ARM64, MSVC2019, WebAssembly, Android and MinGW...

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

                      W 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Witc This does not answer the question which compiler you're using as you installed Qt for ARM64, MSVC2019, WebAssembly, Android and MinGW...

                        W Offline
                        W Offline
                        Witc
                        wrote on last edited by Witc
                        #17

                        @jsulm said in Progress bar is not smooth:

                        @Witc This does not answer the question which compiler you're using as you installed Qt for ARM64, MSVC2019, WebAssembly, Android and MinGW...

                        I am using Qt along with python 3.10 + Pyside6. No any line of my code is written in C/C++ ...

                        1 Reply Last reply
                        0
                        • Marko StankeM Offline
                          Marko StankeM Offline
                          Marko Stanke
                          wrote on last edited by
                          #18

                          Tried it on Qt 5.15, and it works perfectly

                          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