设置程序启动时显示图片:
#include "try4.h"
#include <QtGui/QApplication>
#include <QtGui/QSplashScreen>
#include <QtGui/QPixmap>
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSplashScreen *splash = new QSplashScreen;
splash->setPixmap(QPixmap(":/splash.png"));
splash->show();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash->showMessage(QObject::tr("OK"),
topRight, Qt::white);
try4 w;
splash->showMessage(QObject::tr("Loading modules..."),
topRight, Qt::white); //显示信息
loadModules();
splash->showMessage(QObject::tr("Establishing connections..."),
topRight, Qt::white);
establishConnections();
w.show();
splash->finish(&w);
delete splash;
return a.exec();
}
但是怎么编译时说
1>.\main.cpp(23) : error C3861: 'loadModules': identifier not found
1>.\main.cpp(28) : error C3861: 'establishConnections': identifier not found
求助......................