How to make a beautiful boot?

Want to do in your program picture downloads. You know, that's when .exe only starts sure and there is a picture of the program download progress.
But how to do it?
June 5th 19 at 21:41
1 answer
June 5th 19 at 21:43
This window is implemented in Qt using the QSplashScreen class
Create a QSplashScreen with Qpixmaps for background
QSplashScreen splashScreen(/*const Qpixmaps& pixmap*/ Qpixmaps("/path/to/your/pictures.png"));

Next show this window; //returns void
And set the text (it just shows text that can be used between QSplashScreen::show(); and QSplashScreen::finish();
 /*const QString &message*/ "Message",
 /*int alignment = Qt::AlignLeft*/ Position text
 /*const QColor &color = Qt::black*/ Color QColor);

The position of the text - the bit combination of vertical and horizontal alignment
Horizontal alignment
ConstantThe valueDescription
Qt::AlignLeft0x0001The left alignment
Qt::AlignRight0x0002The alignment on the right
Qt::AlignHCenter0x0004Center alignment

Vertical alignment
ConstantThe valueDescription
Qt::AlignTop0x0020The alignment at the top
Qt::AlignBottom0x0040The alignment at the bottom
Qt::AlignVCenter0x0080Center alignment
A few more flags (English).
You can use no more than one key from one group.
Example: Qt::AlighVCenter | Qt::AlignHCenter - the absolute center of the window

To complete QSplashScreen need to call the function finish:
splashScreen.finish(/*QWidget * mainWin*/ this); //this if your class inherited from QWidget

This function will wait for the show window mainWin and only after that QSplashScreen is closed.

This is the most simple functions. If you need to "something more complicated", then take and create your SplashScreen and render themselves (as well as in the QWidget-e)
I hope that my answer helped You.

Find more questions by tags QMLQt