Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickview-ex.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
//![0]
5
int
main
(
int
argc,
char
*argv[])
6
{
7
QGuiApplication app(argc, argv);
8
9
QQuickView *view =
new
QQuickView;
10
view->setSource(QUrl::fromLocalFile(
"myqmlfile.qml"
));
11
view->show();
12
return
app.exec();
13
}
14
//![0]
15
16
void
makeDocTeamHappyByKeepingExampleCompilable
() {
17
//![1]
18
QScopedPointer<QQuickView> view {
new
QQuickView };
19
view->setInitialProperties({
"x, 100"
}, {
"width"
, 50});
20
view->setSource(QUrl::fromLocalFile(
"myqmlfile.qml"
));
21
view->show();
22
//![1]
23
}
makeDocTeamHappyByKeepingExampleCompilable
void makeDocTeamHappyByKeepingExampleCompilable()
[0]
Definition
qquickview-ex.cpp:16
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
qtdeclarative
src
quick
doc
snippets
qquickview-ex.cpp
Generated on
for Qt by
1.14.0