Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QQmlApplicationEngine>
5#include <QAction>
6#include <QIcon>
7#include <QApplication>
8#include <QWidget>
9
10class DummyWidget : public QWidget {
12
13 QAction *cutAct;
14
15 DummyWidget() {
17 cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this);
19 }
20};
21
22int main()
23{
26 engine.load(QUrl("qrc:/myapp/main.qml"));
28}
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
QQmlApplicationEngine provides a convenient way to load an application from a single QML file.
\inmodule QtCore
Definition qurl.h:94
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
int main()
[0]
#define tr(X)
#define Q_OBJECT
QJSEngine engine
[0]