summaryrefslogtreecommitdiffstats
path: root/examples/pdfwidgets/pdfviewer/main.cpp
blob: 7df5fe253fe6a34211640eab561bd261e5c33c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include "mainwindow.h"
#include <QApplication>
#include <QUrl>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    QStringList args = a.arguments();
    w.show();
    if (args.length() > 1)
        w.open(QUrl::fromLocalFile(args[1]));

    return a.exec();
}