Is there a loading widget?
-
Hi,
I need to widget, which will be use, when the application will be start. So this is a "loading / waiting widget". I know there is a QProgressBar, but I don't know how long will be application started. I need something like GIF, where we have loop:
How can I do that?
-
Hi,
It seems you are looking for QSplashScreen.
-
@SGaist Thank you, but I find something, what I'm looking for:
QProgressBar *bar = new QProgressBar(this); bar->setGeometry(50,50,300,40); bar->setTextVisible(false); bar->setStyleSheet("QProgressBar::chunk { background-color: #2196F3; width: 10px; margin: 0.5px;}"); bar->setMinimum(0); bar->setMaximum(0);
Now I have exactly, what I want, but I have 2 other problems:
- how to change speed of move blue rectangles in this progressBar?
- how to change the amount of blue rectangles in progressBar? I know that I can change width in styleSheet to 20 px, but I would like to have width = 10 px, but I would like to change percent of blue rectangles to 20% in progressBar.
-
- AFAIK you can't
- AFAIK the number is dependent on the width of the bar and the number of steps.
-
@qwe3 said in Is there a loading widget?:
how to change speed of move blue rectangles in this progressBar?
how to change the amount of blue rectangles in progressBar? I know that I can change width in styleSheet to 20 px, but I would like to have width = 10 px, but I would like to change percent of blue rectangles to 20% in progressBar.If you don't like the granularity of the QProgressBar then you'll have to design a custom widget that does what you need. Looks like the granularity of progress is fixed or precacluted by the stock widget.