I'm trying to add a Progress bar as a busy indicator. However, it's behaving strange - the 'progress' only goes a quarter of the way up the bar and then restarts at the beginning. I'm using the following code:
test.cpp
test::test()
{
qProBar->setRange(0,0);
mainLayout->addWidget(qProBar);
setLayout(mainLayout);
}
test::test()
{
QProgressBar *qProBar = new QProgressBar;
qProBar->setRange(0,0);
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->addWidget(qProBar);
setLayout(mainLayout);
}
To copy to clipboard, switch view to plain text mode
test.h
{
Q_OBJECT
public:
test();
~test();
};
class test : public QWidget
{
Q_OBJECT
public:
test();
~test();
};
To copy to clipboard, switch view to plain text mode
I couldn't find any similar problems on the net, and the code is as minimal as it can get. Any ideas? Thanks in advance!
Bookmarks