Я портирую исходники из проекта, который был ранее собран с Qt 5.6, теперь я обновляюсь до 5.11
При попытке собрать проект выдается ошибка:
'QJSEngine' file not found
В моем источнике:
#include <QtGlobal>
#include <QDateTime>
#include <QDesktopWidget>
#include <QDebug>
#include <QJSEngine>
#include <QKeyEvent>
#include <QList>
#include <QObject>
#include <QPainter>
#include <QPainterPath>
#include <QMainWindow>
#include <QMutex>
#include <QScreen>
#include <QString>
#include <QTimer>
#include <QUrl>
#include <QWidget>
В функции, которую я использую:
QJSEngine engine;
QJSValue objResult = engine.evaluate(strExpression);
Qt Creator Об информации:
Qt Creator 4.8.0-beta (4.7.82)
Based on Qt 5.11.2 (Clang 8.0 (Apple), 64 bit)
Built on Oct 10 2018 05:23:06
From revision 4801348a31
О моем iMac:
macOS Mojave
version 10.14
iMac (Retina 5K, 27-inch, Late 2015)
Processor 4GHz Intel Core i7
Memory 16 GB 1867 MHz DDR3
Graphics AMD Radeon R9 M395X 4096 MB
Я также пробовал это на предыдущей сборке Qt Creator, те же результаты.
Это pro-файл:
#-------------------------------------------------
#
# Project created by QtCreator 2018-10-15T09:17:31
#
#-------------------------------------------------
QT += core gui widgets
TARGET = XMLMPAM
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++11
SOURCES += \
main.cpp \
clsMainWnd.cpp
HEADERS += \
clsMainWnd.h
FORMS += \
clsMainWnd.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
clsmainwnd.qrc