mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +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:
commit
ab1a999df4
@ -14,11 +14,8 @@ int main(int argc, char *argv[])
|
|||||||
format.setStencilBufferSize(0);
|
format.setStencilBufferSize(0);
|
||||||
QSurfaceFormat::setDefaultFormat(format);
|
QSurfaceFormat::setDefaultFormat(format);
|
||||||
|
|
||||||
// TODO: something with QCommandLineParser to accept a file to launch.
|
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
MainWindow *const w = (argc > 1) ? new MainWindow(argv[1]) : new MainWindow();
|
||||||
MainWindow *w = new MainWindow();
|
|
||||||
w->setAttribute(Qt::WA_DeleteOnClose);
|
w->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
w->show();
|
w->show();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user