Ich will einfach mal einen SplashScreen anzeigen, funktioniert aber nicht,
er zeigt mir gar nix an. Nur meinen Hauptdialog.
Hier der Komplette Code meiner Main.cpp
Code: Alles auswählen
#include <Qt/QApplication.h>
#include <Qt/QSplashScreen.h>
#include <Qt/QMainwindow.h>
// QT includes
#ifdef Q_WS_WIN
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
int main(int argc, char **argv);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return main(__argc, __argv);
}
#endif
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPixmap pixmap(":/images/splash.png");
QSplashScreen* splashScreen = new QSplashScreen(pixmap,Qt::WindowStaysOnTopHint );
splashScreen->show();
splashScreen->showMessage("Initialising Engine", Qt::AlignCenter |Qt::AlignBottom | Qt::AlignAbsolute, Qt::black);
app.processEvents();
for(double i=0;i<10000000;i++)
{
}
QMainWindow window;
window.show();
splashScreen->finish(&window);
return app.exec();
}