Qt 5.10 Book Examples
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 
18  QLabel lbl("<H1><CENTER>QLabel - HTML Demo</CENTER></H1>"
19  "<H2><CENTER>Image</CENTER><H2>"
20  "<CENTER><IMG BORDER=\"0\" SRC=\":/Balalaika.png\"></CENTER>"
21  "<H2><CENTER>List</CENTER><H2>"
22  "<OL><LI>One</LI>"
23  " <LI>Two</LI>"
24  " <LI>Three</LI>"
25  "</OL>"
26  "<H2><CENTER>Font Style</CENTER><H2>"
27  "<CENTER><FONT COLOR=RED>"
28  " <B>Bold</B>, <I>Italic</I>, <U>Underline</U>"
29  "</FONT></CENTER>"
30  "<H2><CENTER>Table</CENTER></H2>"
31  "<CENTER> <TABLE>"
32  " <TR BGCOLOR=#ff00ff>"
33  " <TD>1,1</TD><TD>1,2</TD><TD>1,3</TD><TD>1,4</TD>"
34  " </TR>"
35  " <TR BGCOLOR=YELLOW>"
36  " <TD>2,1</TD><TD>2,2</TD><TD>2,3</TD><TD>2,4</TD>"
37  " </TR>"
38  " <TR BGCOLOR=#00f000>"
39  " <TD>3,1</TD><TD>3,2</TD><TD>3,3</TD><TD>3,4</TD>"
40  " </TR>"
41  "</TABLE> </CENTER>"
42  );
43 
44  lbl.show();
45 
46  return app.exec();
47 }
QLabel * lbl(const QPainter::CompositionMode &mode)
Definition: main.cpp:14
int main(int argc, char **argv)
Definition: main.cpp:15