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
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?
Qt Code:To copy to clipboard, switch view to plain text mode
hope its help.
Anurag Shukla
A man who never makes mistake is the man who never does anything! Theodre Rosvelt!
Using QSplashScreen usually involves setting Qt::WindowFlags, namely Qt::WindowStaysOnTopHint to get desired result.
I'd changed fragment of your code as follows:
Qt Code:
int main(int argc, char *argv[]) { splash.show(); app.processEvents(); // (...) splash.finish(&w); return app.exec(); }To copy to clipboard, switch view to plain text mode
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.
Qt Code:
void Form2::onOk() { splash->show(); Qt::AlignRight | Qt::AlignTop, Qt::white); delete splash; }To copy to clipboard, switch view to plain text mode
Plz tell me how to solve the problem.
Regards
Raghvendra
Last edited by jpn; 8th February 2008 at 08:47. Reason: missing [code] tags
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:
Qt 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();To copy to clipboard, switch view to plain text mode
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
Bookmarks