Hi all Expert,
I am designing a custom SplashScreen , I have set a pixmap to it which has some transparent part in it . I have loaded a new image to the splashScreen in its drawContents( ) function to certain location.
But I am not able to set the splachscreen fully transparent so that i can see my desktopImage through it.I had tried several options mentioned in the forum but unfortunately that did'nt work.
Please let me know where i am going wrong.
.h file
.cpp fileclass CustomSplashScreenublic QSplashScreen
{
Q_OBJECT
public:
CustomSplashScreen(const QPixmap& pixmap);
~CustomSplashScreen();
protected:
virtual void drawContents(QPainter *painter);
void paintEvent(QPaintEvent *event);
};
I want the result like final_Result_splashScreen.pngCustomSplashScreen::CustomSplashScreen(const QPixmap& pixmap)
{
QSplashScreen::setPixmap(pixmap);
}
CustomSplashScreen::~CustomSplashScreen()
{
}
void CustomSplashScreen::drawContents(QPainter *painter)
{
QImage image("://images/3.png");
painter->drawImage(-2,-2,image);
}
void CustomSplashScreen:aintEvent(QPaintEvent *event)
{
QPainter *painter = new QPainter(this);
setAttribute(Qt::WA_NoSystemBackground);
}
Bookmarks