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 showing: don't understand how progress bar works
Forum Update on Monday, May 27th 2025

Progress bar is not showing: don't understand how progress bar works

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 4 Posters 1.7k 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.
  • M Offline
    M Offline
    m3g1dd
    wrote on last edited by
    #1

    The progress bar is implemented like this:

    import QtQuick.Controls 2.0 as QQC20
    
    Item {
        QQC20.ProgressBar {
            id: progressbar_id
            visible: false // even if "true", the progress bar does NOT show up on UI
            from: editorScene.progressbarMin
            to: editorScene.progressbarMax
            value: editorScene.progressbarVal
    
            onValueChanged: {
                console.log("Progressbar value changed: ", progressbar_id.value)
            }
            onVisibleChanged: {
                console.log("Progressbar visibility chanaged: ", progressbar_id.visible)
            }
        }
    }
    

    The progress bar value and visibility are actually changed as confirmed by the methods onValueChanged and onVisibleChanged.

    But the progress bar does NOT show up on the UI!

    T 1 Reply Last reply
    0
    • M m3g1dd

      The progress bar is implemented like this:

      import QtQuick.Controls 2.0 as QQC20
      
      Item {
          QQC20.ProgressBar {
              id: progressbar_id
              visible: false // even if "true", the progress bar does NOT show up on UI
              from: editorScene.progressbarMin
              to: editorScene.progressbarMax
              value: editorScene.progressbarVal
      
              onValueChanged: {
                  console.log("Progressbar value changed: ", progressbar_id.value)
              }
              onVisibleChanged: {
                  console.log("Progressbar visibility chanaged: ", progressbar_id.visible)
              }
          }
      }
      

      The progress bar value and visibility are actually changed as confirmed by the methods onValueChanged and onVisibleChanged.

      But the progress bar does NOT show up on the UI!

      T Offline
      T Offline
      Tirupathi Korla
      wrote on last edited by
      #2

      @m3g1dd You are missing width and height. add them .

      M 1 Reply Last reply
      2
      • M Offline
        M Offline
        Mammamia
        wrote on last edited by
        #3

        @m3g1dd I have used your code and set visible: true and the Slider shows up on the top left corner of the window.

        It might also happen that the value which you set for the visible variable from other entity is always false.

        1 Reply Last reply
        0
        • T Tirupathi Korla

          @m3g1dd You are missing width and height. add them .

          M Offline
          M Offline
          m3g1dd
          wrote on last edited by
          #4

          @Tirupathi-Korla I tried width and height but the progress bar is still NOT showing. Maybe somewhere else in my code needs to be modified.

          width: 400
          height: 400
          x: 200
          y: 200
          
          T 1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            Run simple program like the following in your setup.

            Item{
                visible: true
                width: 440
                height: 480
                QQC20.ProgressBar{
                    value: 0.5
                    x: 100;y:100
                }
            }
            

            It should run. Then look at your app and check what is the issue. Most probably it is width, height or color issue.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • M m3g1dd

              @Tirupathi-Korla I tried width and height but the progress bar is still NOT showing. Maybe somewhere else in my code needs to be modified.

              width: 400
              height: 400
              x: 200
              y: 200
              
              T Offline
              T Offline
              Tirupathi Korla
              wrote on last edited by
              #6

              @m3g1dd did you change the visiblity to true??

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by
                #7

                @m3g1dd are you able to work with ProgressBar ? If the issue is resolved you move the issue to SOLVED state. If you need a help do let us know.

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                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