Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtScriptEngine Required for QWebFrame, QWebHitTestResult, etc?
williem last edited by
I've run into an issue when I attempt to incorporate some header files.
a few notes up front:
--building from source using qtembeded
--using precompiled headers
--have a lot of modules disabled (including QtScript)
So I've got a QWebView derivative class I was working with and I wanted to extend some of the functionality, namely mousePressEvent. Now mind you, before I started doing this, my code was building fine with no problems. So once I re-implemented this function for my QWebFrame child class, I needed to include a few new headers (QWebFrame, QWebHitTestResult). Well, when I included those headers, my code wouldn't compile because qwebframe.cpp was looking for QtScript/qscriptengine.h.
I since QtScript was disabled, it didn't have/include any of those headers on the install.
It turns out that qwebframe wasn't even using QScriptEngine except for an enum... So I just put in an #ifdef to include either <QtScript/qscriptengine.h> or a QScriptEngine struct with the enum that QWebFrame wanted. I also discovered the same problem in qt_instance.h that needed a similar fix.
Is there any way around this, or is this something that is slated for the next release to fix?