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 change fore-ground color of progress-bar
Forum Updated to NodeBB v4.3 + New Features

How to change fore-ground color of progress-bar

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 4.4k 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.
  • A Offline
    A Offline
    adnan
    wrote on last edited by
    #1

    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
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adnan
        wrote on last edited by
        #3

        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
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adnan
            wrote on last edited by
            #5

            Thanks! perhaps I needed this.

            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