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
10
class
DummyWidget
:
public
QWidget
{
11
Q_OBJECT
12
13
QAction
*cutAct;
14
15
DummyWidget
() {
17
cutAct =
new
QAction
(
QIcon
(
":/images/cut.png"
),
tr
(
"Cu&t"
),
this
);
19
}
20
};
21
22
int
main
()
23
{
25
QQmlApplicationEngine
engine
;
26
engine
.load(
QUrl
(
"qrc:/myapp/main.qml"
));
28
}
DummyWidget
Definition
main.cpp:10
QAction
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition
qaction.h:30
QIcon
The QIcon class provides scalable icons in different modes and states.
Definition
qicon.h:20
QQmlApplicationEngine
QQmlApplicationEngine provides a convenient way to load an application from a single QML file.
Definition
qqmlapplicationengine.h:17
QUrl
\inmodule QtCore
Definition
qurl.h:94
QWidget
The QWidget class is the base class of all user interface objects.
Definition
qwidget.h:99
main
int main()
[0]
Definition
doc_src_objecttrees.cpp:5
tr
#define tr(X)
Definition
qtemporaryfile.cpp:21
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
engine
QJSEngine engine
[0]
Definition
src_script_qjsvalue.cpp:14
qtbase
src
corelib
doc
snippets
resource-system
main.cpp
Generated by
1.10.0