Allow building with Qt 4 and Qt 5
authorFranklin S Cooper Jr <fcooper@ti.com>
Wed, 25 Feb 2015 14:43:00 +0000 (08:43 -0600)
committerFranklin S. Cooper Jr <fcooper@ti.com>
Wed, 25 Feb 2015 14:44:38 +0000 (08:44 -0600)
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
image-gallery.pro
main.cpp

index 56e407e11bd1ec4b7d92a8745a83d032ea6c6c23..c564848f6d90ab0250395ea0ff0ab71a7880c81c 100644 (file)
@@ -4,7 +4,7 @@
 #
 #-------------------------------------------------
 
-QT       += core gui
+QT       += core gui widgets
 
 TARGET = image-gallery
 TEMPLATE = app
index 63a1649261645e95b0bf0808650e70416f92054e..efac5eb86946ed4b3188c87e49aee35f0016aafa 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,4 +1,11 @@
-#include <QtGui/QApplication>
+#include <qglobal.h>
+
+#if QT_VERSION < 0x050000
+       #include <QtGui/QApplication>
+#else
+       #include <QApplication>
+#endif
+
 #include "mainwindow.h"
 #include <iostream>