I am trying to implement a starup banner that should be shown above the main application window. It works fine on Windows, but on Mac OS X I can't get two windows shown at the same time (unless I show the banner after a some large time interval). Is there a way to ensure the window is visible on the screen before showing another one?

This is how I tried it:
Qt Code:
  1. #include <QApplication>
  2.  
  3. #include "mainwindow.h"
  4. #include "banner.h"
  5.  
  6. int main(int argc, char * argv[])
  7. {
  8. QApplication app(argc, argv);
  9.  
  10. MainWindow mainWindow;
  11. mainWindow.show();
  12. //mainWindow.raise();
  13.  
  14. Banner banner;
  15. //QTimer::singleShot(0, &banner, SLOT(show()));
  16. //QTimer::singleShot(0, &banner, SLOT(raise()));
  17. banner.show();
  18.  
  19. return app.exec();
  20. }
To copy to clipboard, switch view to plain text mode 

I tried to use show, raise, delayed show/raise with zero-time interval, but nothing helps: still I see only the banner window when the application is launched, the main window becomes visible only when I click the application icon on the task bar.