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
src_corelib_tools_qcommandlineoption.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 David Faure <faure@kde.org>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
include
<
QCommandLineOption
>
5
#
include
<
QCommandLineParser
>
6
7
int
main
()
8
{
9
{
10
//! [0]
11
QCommandLineOption verboseOption(
"verbose"
,
"Verbose mode. Prints out more information."
);
12
QCommandLineOption outputOption(QStringList() <<
"o"
<<
"output"
,
"Write generated data into <file>."
,
"file"
);
13
//! [0]
14
}
15
16
{
17
//! [cxx11-init]
18
QCommandLineParser parser;
19
parser.addOption({
"verbose"
,
"Verbose mode. Prints out more information."
});
20
//! [cxx11-init]
21
}
22
23
{
24
//! [cxx11-init-list]
25
QCommandLineParser parser;
26
parser.addOption({{
"o"
,
"output"
},
"Write generated data into <file>."
,
"file"
});
27
//! [cxx11-init-list]
28
}
29
}
main
int main()
[open]
Definition
doc_src_objecttrees.cpp:7
qtbase
src
corelib
doc
snippets
code
src_corelib_tools_qcommandlineoption.cpp
Generated on
for Qt by
1.18.0