zorro68
24th October 2007, 06:25
Now my application is finish (only some little modification) and I run in windows mode and works ok. I use Qt because i want to run in windows and linux mode. But when i run in linux mode, compiled and linked ok but run bad. I have this message in linux terminal windows:
QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
My main.cpp is:
Q_INIT_RESOURCE(qtdam);
QApplication *app = new QApplication(argc, argv);
QSplashScreen *splash = new QSplashScreen;
QString path=app->applicationDirPath();
lang.setfile_idioma(path+"/languages.lng");
if (lang.idioma_seleccionado=="Español")
splash->setPixmap(QPixmap(":/images/splash_espagnol.png"));
else
splash->setPixmap(QPixmap(":/images/splash.png"));
splash->show();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash->showMessage(lang.leer_idioma("1"),topRight, Qt::white);
MainWindow mainWin;
mainWin.show();
splash->finish(&mainWin);
delete splash;
return app->exec();
the splash screen (*.png) works and read the language.lng ok because it puts the correct png, but it stop there. I have to do Ctrl+C to stop the application.
What's happend???
PS: I have Mandriva 2007
QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
My main.cpp is:
Q_INIT_RESOURCE(qtdam);
QApplication *app = new QApplication(argc, argv);
QSplashScreen *splash = new QSplashScreen;
QString path=app->applicationDirPath();
lang.setfile_idioma(path+"/languages.lng");
if (lang.idioma_seleccionado=="Español")
splash->setPixmap(QPixmap(":/images/splash_espagnol.png"));
else
splash->setPixmap(QPixmap(":/images/splash.png"));
splash->show();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash->showMessage(lang.leer_idioma("1"),topRight, Qt::white);
MainWindow mainWin;
mainWin.show();
splash->finish(&mainWin);
delete splash;
return app->exec();
the splash screen (*.png) works and read the language.lng ok because it puts the correct png, but it stop there. I have to do Ctrl+C to stop the application.
What's happend???
PS: I have Mandriva 2007