QProgressBar - setRange and style sheet



  • Since I don't know how long my algorithm will take, I want an "infinite" progress bar indicating that my algorithm is still executing.
    To do this, one can simply use setRange(0, 0) and this will create and "infinite" bar. Here some questions about this function:

    Will this work on all systems (I can't seem to find anything on this in the API docs) ?

    When setting the range from 0 to 0, the chunk runs from left to right, then from left to right, etc (as I want it). However when I set the chunk's style sheet, the chunk runs from left to right, moves out of the bar and starts from left again. How can I fix the chunk to move from side to side even when I change the style sheet?

    When I set the range, my text on the progress bar disappears. How can I keep the text?

    How can I change the size of the chunk? When I set width in QProgressBar::chunk, the chunk is "divided" in segments of the style sheet's width. I want a single chunk with a fixed width.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.