summaryrefslogtreecommitdiffstats
path: root/examples/designer/worldtimeclockbuilder/main.cpp
blob: 18e879052eafc1300f16324f5bcba9e782160d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//! [0]
#include <QtUiTools>
//! [0]
#include <QApplication>
#include <QWidget>
#include <QFile>

using namespace Qt::StringLiterals;

//! [1]
int main(int argc, char *argv[])
{
    Q_INIT_RESOURCE(worldtimeclockbuilder);

    QApplication app(argc, argv);

    QUiLoader loader;
//! [1]

//! [2]
    QFile file(u":/forms/form.ui"_s);
    file.open(QFile::ReadOnly);

    QWidget *widget = loader.load(&file);

    file.close();
    widget->show();
//! [2]

//! [3]
    return app.exec();
}
//! [3]