Qt 5.10 Book Examples
chapter10
TextEdit
main.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// main.cpp
3
// ======================================================================
4
// This file is a part of the book
5
// "Qt 5.10 Professional programming with C++"
6
// http://qt-book.com
7
// ======================================================================
8
// Copyright (c) 2017 by Max Schlee
9
// ======================================================================
10
11
#include <QtWidgets>
12
13
// ----------------------------------------------------------------------
14
int
main
(
int
argc,
char
** argv)
15
{
16
QApplication app(argc, argv);
17
QTextEdit txt;
18
19
txt.setHtml(
"<HTML>"
20
"<BODY BGCOLOR=YELLOW>"
21
"<CENTER><IMG SRC=\":/MetroGnome.png\"></CENTER>"
22
"<H2><CENTER>Gnome Poem</CENTER></H2>"
23
"<FONT COLOR=BLUE>"
24
"<P ALIGN=\"center\">"
25
"<I>"
26
"Magic! Magic!<BR>"
27
"Magic! Magic!<BR>"
28
"Magic! Magic!<BR>"
29
"..."
30
"</I>"
31
"</P>"
32
"</FONT>"
33
"</BODY>"
34
"</HTML>"
35
);
36
txt.resize(320, 350);
37
txt.show();
38
39
return
app.exec();
40
}
main
int main(int argc, char **argv)
Definition:
main.cpp:15
Generated by
1.8.14