I'm looking for a way to get the currAlign and the currStatus

//painter->drawText(r, d_func()->currAlign, d_func()->currStatus);

and also to make the hide on mousePressEvent work.

Qt Code:
  1. #ifndef CUSTOMSPLASHSCREEN_H
  2. #define CUSTOMSPLASHSCREEN_H
  3.  
  4. #include <QSplashScreen>
  5. #include <QPainter>
  6.  
  7. class customSplashScreen
  8. :public QSplashScreen
  9. {
  10.  
  11. public:
  12. customSplashScreen(const QPixmap& pixmap);
  13. ~customSplashScreen();
  14. virtual void drawContents(QPainter *painter);
  15. virtual void mousePressEvent(QMouseEvent *);
  16. };
  17.  
  18. #endif // CUSTOMSPLASHSCREEN_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. #include "customSplashScreen.h"
  2.  
  3. customSplashScreen::customSplashScreen(const QPixmap& pixmap)
  4. {
  5. QSplashScreen::setPixmap(pixmap);
  6. };
  7.  
  8. customSplashScreen::~customSplashScreen()
  9. {
  10. };
  11.  
  12. void customSplashScreen::drawContents(QPainter *painter)
  13. {
  14. QPixmap textPix = QSplashScreen::pixmap();
  15. painter->setPen(Qt::black);
  16. QRect r = rect();
  17. r.setRect( 170, 397, 245, 14 );
  18. painter->drawText(r, "Loading something message...");
  19. };
  20.  
  21. void customSplashScreen::mousePressEvent(QMouseEvent *)
  22. {
  23. this->hide();
  24. };
To copy to clipboard, switch view to plain text mode