KSplashScreen usage
Lubos Lunak
l.lunak at suse.cz
Tue May 25 18:50:11 BST 2004
On Tuesday 25 of May 2004 19:29, Andras Mantia wrote:
> 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);
I don't know about the rest, but for a start you could drop this W* rubbish
and let the class handle it itself.
> 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
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the kde-core-devel
mailing list