summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textblock-formats
diff options
context:
space:
mode:
authorNico Vertriest <[email protected]>2020-08-17 06:38:38 +0200
committerPaul Wicking <[email protected]>2020-09-01 06:13:10 +0200
commitb6043dc34e8156f4ba74b3fb7be0e62aff1364af (patch)
tree05dead2af7ad05c356b39f0b90762e5f948c0b0a /src/gui/doc/snippets/textblock-formats
parent03887ab8a3fb81fb7059ad1d9e3d9cac224e53e7 (diff)
Doc: Make snippets Qt Gui compilable - textblock-formats
Task-number: QTGUI-81486 Change-Id: I06dd6ce04b4d37c49df07d4b1b47c3ef029ee419 Reviewed-by: Topi Reiniƶ <[email protected]>
Diffstat (limited to 'src/gui/doc/snippets/textblock-formats')
-rw-r--r--src/gui/doc/snippets/textblock-formats/main.cpp6
-rw-r--r--src/gui/doc/snippets/textblock-formats/textblock-formats.pro8
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/doc/snippets/textblock-formats/main.cpp b/src/gui/doc/snippets/textblock-formats/main.cpp
index daa8f67f8bb..ec3075c2e32 100644
--- a/src/gui/doc/snippets/textblock-formats/main.cpp
+++ b/src/gui/doc/snippets/textblock-formats/main.cpp
@@ -47,15 +47,15 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtGui>
+#include <QApplication>
+#include <QTextEdit>
QString tr(const char *text)
{
return QApplication::translate(text, text);
}
-int main(int argc, char *argv[])
+int main_textblock_formats(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/src/gui/doc/snippets/textblock-formats/textblock-formats.pro b/src/gui/doc/snippets/textblock-formats/textblock-formats.pro
index d664835b09a..e7f408716fe 100644
--- a/src/gui/doc/snippets/textblock-formats/textblock-formats.pro
+++ b/src/gui/doc/snippets/textblock-formats/textblock-formats.pro
@@ -1,2 +1,6 @@
-QT += xml
-SOURCES = main.cpp
+TEMPLATE = lib
+TARGET = gui_snippets_textblock_formats
+QT += core gui widgets
+
+SOURCES = \
+ main.cpp