Hi i have an application in which i am displaying a splash screen on clicking a button.
but the splash screen is displayed at the background of the form.
Where can be the problem??????????
Regards
Raghvendra
Printable View
Hi i have an application in which i am displaying a splash screen on clicking a button.
but the splash screen is displayed at the background of the form.
Where can be the problem??????????
Regards
Raghvendra
In the code you use :)
And seriously, can you paste some of it? :)
Code:
hope its help.
Using QSplashScreen usually involves setting Qt::WindowFlags, namely Qt::WindowStaysOnTopHint to get desired result.
I'd changed fragment of your code as follows:
Code:
int main(int argc, char *argv[]) { splash.show(); app.processEvents(); // (...) splash.finish(&w); return app.exec(); }
Sorry, I didn't spot earlier, that this topic is related to Qt3. In this case, you probably should use Qt::WStyle_StaysOnTop. There is also Qt::WStyle_Splash, maybe it'll be sufficient for you.
Hi ,
I tried with the "WStyle_StaysOnTop" flag but still my flash screen is in the back ground.
I am pasting a piece of my code.
In my application when i am clicking the ok button the function below is called and shall display Splash Screen on top.
Code:
void Form2::onOk() { splash->show(); Qt::AlignRight | Qt::AlignTop, Qt::white); delete splash; }
Plz tell me how to solve the problem.
Regards
Raghvendra
Are you deleting the splash screen right after creating it?
Actually i am creating bthe Splash screen , writting the message to it and then deleting the splash.
The splash screen comes and displays the message also but it comes at the background of the widget from where i am calling it.
So to see that i have to minimize my widget every time i call it.
hope i am clear with the problem................
Here is my working code for a splashscreen:
Code:
splash->show(); a.processEvents(); createMimeFactory(); editor *mw= new editor(); a.processEvents(); plugins.load(plugspath); plugins.addIOFormat((void*)newSTL, "STL"); a.processEvents(); splash->finish(mw); splash->deleteLater();
If changing line with deleting splash immediately after creating don't help you, you can try adding flag WX11BypassWM as documentation suggests, necessity of putting this flag depends on WM you use, so I presume it is better to always have it.
Did you try also Qt::WStyle_Splash? If your WM doesn't support NETWM, than mentioned earlier WX11BypassWM flag is used.
HI,
thanx everyone my problem is solved now.
i have used raise() to bring it to the top and it is working now..........
Regards