not able to view progressbar
My parent widget is having Qt::FramelessWindowHint as windows flags. In this widget: I display logo in full screen[image set to a label control].Logo is displays with black background.I have a progressbar which is set with following stylesheet:
- QString("QProgressBar { border: 1px solid green; background: red; padding: 1px; text-align: left ; } ") +
- QString("QProgressBar::chunk:horizontal { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 yellow); } ") +
- QString("QProgressBar::chunk:indeterminate { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 yellow); }"));
Also: I set windows flags to progressbar as progressBar->setWindowFlags(Qt::WindowStaysOnTopHint);
But I am not able to view the progressbar in the widget when I run the program. Can somebody help.
3 replies
I did not set any windows flags to my main widget. I have initially one label which covers entire widget[it has same width & height as main widget].That label contains logo. I will have to show progressbar in the middle of the widget. When I execute the program: I am able to view the logo. But progressbar is not shown. Can somebody assist to resolve this issue.
The tags i meant is about posting your code in the forum. like this:
- QString(“QProgressBar { border: 1px solid green; background: red; padding: 1px; text-align: left ;} “)
Okay, you have a Main Window, inside one full screen label too. Above this, about the center one progress bar which is not visible.
May be it is hidden , and have you tried QWidget::raise () [developer.qt.nokia.com]
Alternately you can use QProgressDialog too
You must log in to post a reply. Not a member yet? Register here!

