summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-imagedrop
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/snippets/textdocument-imagedrop')
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/main.cpp9
-rw-r--r--src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro10
2 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
index 198555c579b..c7f7e2df45c 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
+++ b/src/gui/doc/snippets/textdocument-imagedrop/main.cpp
@@ -47,16 +47,15 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-#include <QtGui>
#include "textedit.h"
+#include <QApplication>
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
- TextEdit *textEdit = new TextEdit;
- textEdit->show();
+ TextEdit textEdit;
+ textEdit.show();
return app.exec();
-} \ No newline at end of file
+}
diff --git a/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro b/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
index 96d3038a093..5f1c55f0381 100644
--- a/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
+++ b/src/gui/doc/snippets/textdocument-imagedrop/textdocument-imagedrop.pro
@@ -1,2 +1,8 @@
-SOURCES = textedit.cpp main.cpp
-HEADERS = textedit.h \ No newline at end of file
+TEMPLATE = lib
+TARGET = textdocument-imagedrop
+QT += core gui widgets
+
+HEADERS = \
+ textedit.h
+SOURCES = \
+ main.cpp