Custom splashscreen with text
Snippet how to create a splashscreen with opacity and dynamic text:

Example of main:
- customSplashScreen *splash = new customSplashScreen(splashImage);
- QFont splashFont;
- splashFont.setFamily("Arial");
- splashFont.setBold(true);
- splashFont.setPixelSize(9);
- splashFont.setStretch(125);
- splash->setFont(splashFont);
- splash->setMask(splashMask);
- splash->show();
- /* To intercept mousclick to hide splash screen. Since the
- splash screen is typically displayed before the event loop
- has started running, it is necessary to periodically call. */
- app.processEvents();
- /* Some code here */
- app.processEvents();
customSplashScreen.h:
customSplashScreen.cpp:
- #include "customSplashScreen.h"
- {
- };
- customSplashScreen::~customSplashScreen()
- {
- };
- {
- painter->setPen(this->color);
- painter->drawText(this->rect, this->alignement, this->message);
- };
- {
- this->message = message;
- this->color = color;
- this->showMessage(this->message, this->alignement, this->color);
- };
- {
- this->rect = rect;
- this->alignement = alignement;
- };
Splash PNG:

Mask PNG:


