I have changed my main.cpp code for this one:
#include <QSplashScreen>
#include <QApplication>
#include "mainwindow.h"
#include "languages.h"
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(qtdam);
QString path
=app.
applicationDirPath();
IDIOMA *lang = new IDIOMA();
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();
}
#include <QSplashScreen>
#include <QApplication>
#include "mainwindow.h"
#include "languages.h"
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(qtdam);
QApplication app(argc, argv);
QSplashScreen *splash = new QSplashScreen;
QString path=app.applicationDirPath();
IDIOMA *lang = new IDIOMA();
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();
}
To copy to clipboard, switch view to plain text mode
and in windows works but in linux show the splash screen and dont say nothing, but the app not show????
Bookmarks