Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to change fore-ground color of progress-bar

    General and Desktop
    2
    5
    4055
    Loading More Posts
    • 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.
    • A
      adnan last edited by

      How can we change chunk color (fore-ground color) of QProgressBar using somewhat similar syntax as shown below:
      @ui->progressBar->setStyle(new QPlastiqueStyle);
      ui->progressBar->setStyleSheet("background-color: white");@

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        "Customizing QProgressBar":http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qprogressbar

        1 Reply Last reply Reply Quote 0
        • A
          adnan last edited by

          I don't want to use this sort of syntax:
          @QProgressBar::chunk {
          background-color: #05B8CC;
          width: 20px;
          }@

          Where to use this piece of code by the way? in constructor where?
          By the way can't we use a syntax of this type:
          @ui->progressBar->setStyleSheet("background-color: white");@

          1 Reply Last reply Reply Quote 0
          • L
            lgeyer last edited by

            You should start reading right "here":http://qt-project.org/doc/qt-4.8/stylesheet.html.

            1 Reply Last reply Reply Quote 0
            • A
              adnan last edited by

              Thanks! perhaps I needed this.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post