FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppcheck/test/cli/QML-Samples-TableView/main.cpp at main · cppcheck-opensource/cppcheck · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cppcheck-opensource
/
cppcheck
Public
Notifications
You must be signed in to change notification settings
Fork
1.6k
Star
6.7k
Code
Pull requests
200
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
cppcheck
/
test
/
cli
/
QML-Samples-TableView
/
main.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (17 loc) · 613 Bytes
Breadcrumbs
cppcheck
/
test
/
cli
/
QML-Samples-TableView
/
main.cpp
Copy path
File metadata and controls
21 lines (17 loc) · 613 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
include
<
QtGui/QGuiApplication
>
#
include
<
QtQml/QQmlApplicationEngine
>
#
include
"
samplemodel.h
"
int
main
(
int
argc,
char
*argv[])
{
QGuiApplication
app
(argc, argv);
QQmlApplicationEngine engine;
qmlRegisterType<SampleModel>(
"
Test
"
,
1
,
0
,
"
SampleModel
"
);
const
QUrl
url
(
QStringLiteral
(
"
qrc:/main.qml
"
));
QObject::connect
(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj,
const
QUrl &objUrl) {
if
(!obj && url == objUrl)
QCoreApplication::exit
(-
1
);
}, Qt::QueuedConnection);
engine.
load
(url);
return
app.
exec
();
}
Back
|
FazBrowse Home
|
New Git URL