Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4
#
include
<
QtWidgets
/
qapplication
.
h
>
5
6
#
include
"mainwindow.h"
7
8
using
namespace
Qt::StringLiterals;
9
10
int
main
(
int
argc,
char
*argv[])
11
{
12
QApplication app(argc, argv);
13
14
QCoreApplication::setOrganizationName(u"QtProject"_s);
15
QCoreApplication::setApplicationName(u"QDBusViewer"_s);
16
17
MainWindow
mw;
18
#
if
!
defined
(
Q_OS_MACOS
)
&&
!
defined
(
Q_OS_WIN
)
19
app.setWindowIcon(QIcon(
":/qt-project.org/qdbusviewer/images/qdbusviewer.png"_L1
));
20
#
endif
21
#
ifdef
Q_OS_MACOS
22
mw.setWindowTitle(qApp->translate(
"QtDBusViewer"
,
"Qt D-Bus Viewer"
));
23
#
endif
24
25
QStringList args = app.arguments();
26
while
(args.size()) {
27
QString arg = args.takeFirst();
28
if
(arg ==
"--bus"_L1
)
29
mw.addCustomBusTab(args.takeFirst());
30
}
31
32
mw.show();
33
34
return
app.exec();
35
}
MainWindow
[6]
Definition
src_corelib_kernel_qmetaobject.cpp:74
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
qttools
src
qdbus
qdbusviewer
main.cpp
Generated on
for Qt by
1.18.0