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) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#include <QCoreApplication>
5
#include <QFile>
6
#include <QXmlStreamWriter>
7
#include <stdio.h>
8
9
int
main
(
int
argc,
char
*argv[])
10
{
11
QCoreApplication
app
(argc, argv);
12
QFile
output
;
13
output
.open(stdout,
QIODevice::WriteOnly
);
16
QXmlStreamWriter
stream
(&
output
);
17
stream
.setAutoFormatting(
true
);
18
stream
.writeStartDocument();
20
stream
.writeDTD(
"<!DOCTYPE xbel>"
);
21
stream
.writeStartElement(
"xbel"
);
22
stream
.writeAttribute(
"version"
,
"1.0"
);
23
stream
.writeStartElement(
"folder"
);
24
stream
.writeAttribute(
"folded"
,
"no"
);
26
stream
.writeStartElement(
"bookmark"
);
27
stream
.writeAttribute(
"href"
,
"http://qt-project.org/"
);
28
stream
.writeTextElement(
"title"
,
"Qt Project"
);
29
stream
.writeEndElement();
// bookmark
31
stream
.writeEndElement();
// folder
32
stream
.writeEndElement();
// xbel
34
stream
.writeEndDocument();
37
output
.close();
38
return
0;
39
}
QCoreApplication
\inmodule QtCore
Definition
qcoreapplication.h:48
QFile
\inmodule QtCore
Definition
qfile.h:93
QIODeviceBase::WriteOnly
@ WriteOnly
Definition
qiodevicebase.h:19
main
int main()
[0]
Definition
doc_src_objecttrees.cpp:5
stream
EGLStreamKHR stream
Definition
qeglstreamconvenience_p.h:67
output
QT_BEGIN_NAMESPACE typedef uchar * output
Definition
qvideoframeconversionhelper_p.h:24
app
QApplication app(argc, argv)
[0]
qtbase
src
corelib
doc
snippets
qxmlstreamwriter
main.cpp
Generated by
1.10.0