[Qt-interest] How to get Windows taskbar button to appear during splash screen

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Thu Feb 18 08:03:00 CET 2010


Hi Everybody, 

Using Qt 4.6.0 and VS 2008 (no service pack).  My application startup sequence was roughly:

	QApplication a( argc, argv );

	show_splash_screen();

	if (first_time_run_since_installed)
		show_config_wizard();	// Uses splash as parent

	// Load data from database

	remove_splash_screen();

	MyMainWindow w;
	w.show();
	a.exec();

Users on various versions of Windows complain that immediately after installion, the config wizard would not appear in front of other running applications, but behind them.  Furthermore, the application button does not appear in the task bar until the main window is visible.  If the user cannot see the config dialog, they don't realise the application is running.  This gives a poor first impression of the application!  

I have moved all of the initialisation into slots triggered by QTimer::singleShot in the main window constructor, so now my main looks like: 

	QApplication a( argc, argv );
	MyMainWindow w;
	a.exec();

But both problems still remain.  The Win32 documentation says that the taskbar button is created "whenever the application creates an unowned primary window" - whatever that means in Qt terms! 

How can I force the taskbar button to appear as soon as the application is running on Windows?  
How can I force the config wizard to appear on top of other applications before the main window?  

On Mac OSX 10.5, the application icon appears in the dock even before the splash screen appears. 

Thanks for any suggestions, 

Tony.





More information about the Qt-interest-old mailing list