1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-09 05:25:01 +00:00

Merge pull request #812 from TomHarte/QtLoadAtLaunch

Qt: Attempt to load a file if passed on the command line.
This commit is contained in:
Thomas Harte
2020-07-13 22:00:11 -04:00
committed by GitHub

View File

@@ -14,11 +14,8 @@ int main(int argc, char *argv[])
format.setStencilBufferSize(0);
QSurfaceFormat::setDefaultFormat(format);
// TODO: something with QCommandLineParser to accept a file to launch.
QApplication a(argc, argv);
MainWindow *w = new MainWindow();
MainWindow *const w = (argc > 1) ? new MainWindow(argv[1]) : new MainWindow();
w->setAttribute(Qt::WA_DeleteOnClose);
w->show();