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
9int main(int argc, char *argv[])
10{
11 QCoreApplication app(argc, argv);
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}
\inmodule QtCore
\inmodule QtCore
Definition qfile.h:93
int main()
[0]
EGLStreamKHR stream
QT_BEGIN_NAMESPACE typedef uchar * output
QApplication app(argc, argv)
[0]