I have a subclass of QProgressBar that draws its own progress bar groove and contents by overriding paintEvent(), but I've noticed that the height of the bar is apparently supposed to change depending on the graphical theme in use at the time. For example, it looks fine when I test in Linux, but note the difference in height between the top bar and the bottom bars in this Windows Classic theme screenshot:
The top is the native QProgressBar. I want to duplicate that appearance. How do I get the correct vertical "gutter" spacing for the active style so that I can draw the bar at the correct distance from the borders of the groove?
EDIT: I think what I'm looking for is a PixelMetric from the active style, but I'm not sure which one. The only one that seems to be specific to progress bars is QStyle::PM_ProgressBarChunkWidth, but that's obviously not what I need. Any ideas?
--Colin
Bookmarks