Hello,
Here is my code. I am trying to display the "Logo" image as a splash screen on top all of my windows. But when executing , the splash screen is displayed on bottom of the main widget. What is the reason ? How can I solve it ?
#include <qapplication.h>
#include "welform.h"
#include <qtimer.h>
#include <qpixmap.h>
#include <qsplashscreen.h>
int main( int argc, char ** argv )
{
welForm *w;
splash
=new QSplashScreen(logo,Qt
::WStyle_StaysOnTop|Qt
::WX11BypassWM);
splash->show();
QTimer::singleShot(5*1000,splash,
SLOT(close
()));
w=new welForm(0,"welForm");
a.setMainWidget(w);
w->show();
//delete splash;
//a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
int rc=a.exec();
//splash->finish(w); this finish() also not work.... so I commented it.
if(splash)
delete splash;
return rc;
}
#include <qapplication.h>
#include "welform.h"
#include <qtimer.h>
#include <qpixmap.h>
#include <qsplashscreen.h>
int main( int argc, char ** argv )
{
QSplashScreen *splash=NULL;
QApplication a( argc, argv );
welForm *w;
QPixmap logo(QPixmap::fromMimeSource("Logo"));
splash=new QSplashScreen(logo,Qt::WStyle_StaysOnTop|Qt::WX11BypassWM);
splash->show();
QTimer::singleShot(5*1000,splash,SLOT(close()));
w=new welForm(0,"welForm");
a.setMainWidget(w);
w->show();
//delete splash;
//a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
int rc=a.exec();
//splash->finish(w); this finish() also not work.... so I commented it.
if(splash)
delete splash;
return rc;
}
To copy to clipboard, switch view to plain text mode
thanks in advance............
A S Vinod
Bookmarks