Qt World Summit: Submit your Presentation

QProgressBar.resize() works only for vertical bars, clips horizontal

  • I'm using PyQt5 to make a widget which has dynamically-placed and resized progressbars on top of an image. The problem is, QProgressBar.resize() works fine for vertical progressbars, and clips horizontal ones. In particular, it doesn't produce a square at all if asked to.

    I've been on that issue for hours now, there is no way I'm solving this one on my own it seems. I've got a much bigger code, but I reproduced the problem with the following:

    @class Test(QWidget):
    def init(self):
    super(Test, self).init()
    self.pb = QProgressBar(self);

    def upd(self):

    gui = Test()

    This does not produce a square. What is happening?

    Here is what it looks like on the main program:
    !http://i.stack.imgur.com/Y2rHZ.png(Problem on main program)!

Log in to reply