summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/resource-system/main.cpp
blob: 7089ebf5762e15e343a0a5450134182c1f60ad4e (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#include <QQmlApplicationEngine>
#include <QAction>
#include <QIcon>
#include <QApplication>
#include <QWidget>

class DummyWidget : public QWidget {
    Q_OBJECT

    QAction *cutAct;

    DummyWidget() {
        //! [QAction]
        cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
        //! [QAction]
    }
};

int main()
{
//! [url]
    QQmlApplicationEngine engine;
    engine.load(QUrl("qrc:/myapp/main.qml"));
//! [url]
}