本文整理汇总了C++中QSplashScreen::showMaximized方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplashScreen::showMaximized方法的具体用法?C++ QSplashScreen::showMaximized怎么用?C++ QSplashScreen::showMaximized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplashScreen
的用法示例。
在下文中一共展示了QSplashScreen::showMaximized方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv)
{
try
{
/* Registering the below classes as metatypes in order to make
them liable to be sent through signal parameters. */
qRegisterMetaType<ObjectType>("ObjectType");
qRegisterMetaType<Exception>("Exception");
qRegisterMetaType<ValidationInfo>("ValidationInfo");
//Install a signal handler to start crashhandler when SIGSEGV or SIGABRT is emitted
signal(SIGSEGV, startCrashHandler);
signal(SIGABRT, startCrashHandler);
Application app(argc,argv);
//Loading the application splash screen
QSplashScreen splash;
QPixmap pix(QPixmap(":imagens/imagens/pgmodeler_splash.png"));
splash.setPixmap(pix);
splash.setMask(pix.mask());
#ifndef Q_OS_MAC
splash.setWindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint);
#else
splash.setWindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint);
#endif
#ifdef Q_OS_WIN
splash.show();
#else
splash.showMaximized();
#endif
app.processEvents();
//Creates the main form
MainWindow fmain;
//Loading models via command line on MacOSX are disabled until the file association work correclty on that system
#ifndef Q_OS_MAC
QStringList params=app.arguments();
params.pop_front();
//If the user specifies a list of files to be loaded
if(!params.isEmpty())
fmain.loadModels(params);
#endif
splash.finish(&fmain);
fmain.showMaximized();
return(app.exec());
}
catch(Exception &e)
{
QTextStream ts(stdout);
ts << e.getExceptionsText();
return(e.getErrorType());
}
}