PDA

View Full Version : Embedding QProgressBar in QStatusBar: Height issues



elahav
10th February 2009, 20:35
When displaying a QProgressBar inside a QStatusBar, the status bar expands vertically to accomodate the progress bar, which I would like to avoid. I tried reducing the height of the progress bar in several ways, but it always grows back. This may be an issue with the Plastique style, which uses a lot of spacing around the text, and also forces the font to use a bold face.
Is there any straight-forward way to reduce the vertical size of the progress bar?

--Elad

Remenic
10th February 2009, 22:25
Did you try using style sheets?

Try setting the max-height property in a style sheet.

faldzip
11th February 2009, 06:15
I used QProgressBar::setMaximumHeight() and it's working fine (see attachment)

P.S. It's on Vista with Plastique style

elahav
11th February 2009, 14:39
Thanks. I used setMaximumHeight() using the height of a label in the status bar, and it works well.

--Elad