Drop file opens it, command line arguments

This commit is contained in:
Jakub Melka
2020-11-07 12:03:43 +01:00
parent 08d069ce32
commit 8d9b9cb493
4 changed files with 56 additions and 3 deletions

View File

@ -43,5 +43,11 @@ int main(int argc, char *argv[])
pdfviewer::PDFViewerMainWindow mainWindow;
mainWindow.show();
QStringList arguments = application.arguments();
if (arguments.size() > 1)
{
mainWindow.openDocument(arguments[1]);
}
return application.exec();
}