Doc: Make snippets Qt Gui compilable - textdocument-blocks

Task-number: QTBUG-81486
Change-Id: I663c53d11e4bd3086c4afee0c994d00ecc0c7cad
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Nico Vertriest 2020-08-03 15:01:58 +02:00 committed by Paul Wicking
parent bbbbd642d5
commit 886cc0e442
3 changed files with 15 additions and 9 deletions

View File

@ -8,5 +8,6 @@ contains(QT_BUILD_PARTS, tests) {
code \ code \
draganddrop \ draganddrop \
qfontdatabase \ qfontdatabase \
textdocument-blocks \
textdocument-end textdocument-end
} }

View File

@ -51,12 +51,13 @@
#include <QtGui> #include <QtGui>
#include "mainwindow.h" #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
MainWindow *window = new MainWindow; MainWindow window;
window->resize(640, 480); window.resize(640, 480);
window->show(); window.show();
return app.exec(); return app.exec();
} }

View File

@ -1,6 +1,10 @@
QT += xml TEMPLATE = lib
HEADERS = mainwindow.h \ TARGET = textdocument-blocks_snippets
xmlwriter.h QT += core gui widgets
SOURCES = main.cpp \
mainwindow.cpp \ HEADERS = \
xmlwriter.cpp mainwindow.h
SOURCES = \
main.cpp \
mainwindow.cpp