KSplashScreen usage

Andras Mantia amantia at kde.org
Tue May 25 18:29:33 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 I'm trying to convert Quanta's splashscreen to use KSplashScreen, but 
it seems to not work correctly. According to the docs this should be a 
rather easy task, just create the K/QSplashScreen object, show it, do 
some work and delete it. The results I get is:
- - the splash is shown
- - the main window appears in top of the splash, so it's hidden (I even 
tried to pass WStyle_StaysOnTop and WStyle_StaysOnTop | WX11BypassWM
to the constructor)
- - the splash remains there in the background until I click on it.
Even stranger, calling any method of the KSplashScreen object after show 
crashes. 

A search through the KDE sources, including extragear showed that there 
is no KDE application that is using KSplashScreen... :-(

I tried the following in the QMainWindow class:
1. in the ctor:
      quantaApp = new QuantaApp(mdiMode); //the main window
      KSplashScreen *sp = new KSplashScreen(UserIcon("quantalogo_be"), 
WStyle_StaysOnTop | WX11BypassWM);
      sp->show();
      setMainWidget(quantaApp);
      slotInit(); //here are the time expensive operations

2. at the end of slotInit():
  delete sp;

putting sp->finish(quantaApp) after setMainWidget() or sp->hide() before 
delete sp crashes the application and indicates that sp is NULL.

Does anyone know how should I use this class correctly?

Andras

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAs4KBTQdfac6L/08RAjhTAJ4zVAyLcRlGSgw8jPu7GLU2xtWgQQCg3lY6
Z8AQfr9NVrpu1NIiZTVl/xw=
=BBB6
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list