You have to subclass QProgressBar and reimplement paintEvent().