diff --git a/src/makeqpf/main.cpp b/src/makeqpf/main.cpp
index 78dfbf3bf4dac0cb84ea6519066f327550286637..36e357046819467ae9df968c43b524810281cea5 100644
--- a/src/makeqpf/main.cpp
+++ b/src/makeqpf/main.cpp
@@ -39,7 +39,7 @@
 **
 ****************************************************************************/
 
-#include <QtGui>
+#include <QApplication>
 
 #include "qpf2.h"
 #include "mainwindow.h"
diff --git a/src/makeqpf/makeqpf.pro b/src/makeqpf/makeqpf.pro
index bd976db95a37767549609f1b69b6c591357ae5a4..0ab48f4338418418b62f3039338efa4ac7f6e944 100644
--- a/src/makeqpf/makeqpf.pro
+++ b/src/makeqpf/makeqpf.pro
@@ -2,6 +2,7 @@ INCLUDEPATH += ../../src/3rdparty/harfbuzz/src
 QT += widgets gui-private core-private
 CONFIG += console
 DESTDIR = $$QT.designer.bins
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
 
 HEADERS += qpf2.h mainwindow.h
 SOURCES += main.cpp qpf2.cpp mainwindow.cpp
diff --git a/src/qev/qev.cpp b/src/qev/qev.cpp
index 887decea9d9f2578522e498e9b4b62020828b097..676b451c93f11d1cd9c161caccf76e045818833c 100644
--- a/src/qev/qev.cpp
+++ b/src/qev/qev.cpp
@@ -39,7 +39,9 @@
 **
 ****************************************************************************/
 
-#include <QtWidgets>
+#include <QWidget>
+#include <QApplication>
+#include <QDebug>
 
 QT_USE_NAMESPACE