1 Attachment(s)
When I keep clicking on Splashscreen I get following error
QApplication app(argc, argv);
MainWindow window(nullptr, argc, argv);
QPixmap pixmap(":Icons//Mysplash.jpg");
QSplashScreen splash(pixmap);
splash.show();
//app.processEvents();
Qt::Alignment topLeft = Qt::AlignLeft | Qt::AlignTop;
splash.showMessage(QObject::tr("Launch..."),topLef t, Qt::gray);
app.processEvents();
QApplication::setDesktopSettingsAware(false);
QApplication::setStyle("macintosh");
window.InitalSetup();
window.showMaximized();
splash.finish(&window;);
QTimer::singleShot(2000, &splash;, SLOT(close()));
return app.exec();
Attachment 12278
Re: When I keep clicking on Splashscreen I get following error
You should be calling processEvents() periodically while processing in side window.InitalSetup() method
Re: When I keep clicking on Splashscreen I get following error
... and running your program in your debugger to see where it is generating the unhandled exception.
The "nullptr" value passed on line 2 is begging to be misused inside the MainWindow constructor or methods.
The path on line 3 does not need two forward slashes.
You should, in general, copy and paste compilable code when asking for help. The second last line will not compile.