Unknown module(s) in QT: webenginewidgets - c++

Hi. I want to connect QtWebEngineWidgets. To do this, you need to write(https://doc.qt.io/qt-5/qtwebenginewidgets-module.html) in .cpp file
#include <QtWebEngineWidgets>
and
QT += webenginewidgets
inside .pro file.
The problem is that when writing to a .pro file, I get the error - Unknown module(s) in QT: webenginewidgets
Everywhere I read, it is only written that you need to connect the module in the .pro file, but it doesn’t work for me. Am I doing everything right?
• Qt Creator version - 5.0.0 Community
• Qt version - 6.1.3
• C++ compiler version - MSVC2019 64bit 17.032112.339(amd64)
UPD:
I want to add that this module is not in the installer.
Installer exaple1, Installer example2

It turned out that it was necessary to install a newer version of Qt. For example, since version 6.2.3.0 and newer, the installer contains the "WebView" item. I'm installing it now and I'll see if it helps. Thank you.

Possibly the needed files aren't installed. Try adding this package containing the development files:
sudo apt-get install qtwebengine5-dev

Related

How to install Qt Serialport on macOS?

I'm trying to compile this code where the .pro file includes a
QT += serialport
gives me a
Project MESSAGE: Warning: unknown QT: serialport
error. Without Qt, I would use CMake and install the package via vcpkg, Conan, HomeBrew, or something like that. But not sure if Qt has its own package manager. I would appreciate it if you could help me know what is the most canonical way to install and include this library.
P.S.1. In the comments, I'm being told that I need to use Qt's Maintenance Tool, which is sorta the internal package manager for Qt, to install QtSerialPort module. Given that I don't know how to install that via HomeBrew, I installed Qt Creator from the Qt website. I found the Maintenance Tool in <install_dir> the installation folder /Users/<user>/Qt/MaintenanceTool.app which I could open from the terminal by open MaintenanceTool.app while being in that folder. However, I can not see any QtSerialPort module in the options, nor a way to search.
P.S.2. Posted a new question here.
P.S.3. I think this issue arises because I had multiple versions of Qt installed. once I searched for locate qmake and found out the other versions I have installed (e.g., /System/Volumes/Data/usr/local/Cellar/qt/5.14.1/bin/qmake) I could just run that and the MakeFile was generated.

Include Anaconda python 3.6 in Qt C++ application without Anaconda's Qt version

I want to include Anaconda's Python 3.6 in my Qt C++ application. The reason why is that I want to be able to include a neural network in my C++ application, which is written in Python.
I tried to include Python in the following way, which I found online:
INCLUDEPATH += /home/[username]/anaconda3/include/python3.6m
LIBS += -L/home/[username]/anaconda3/lib/ -lpython3.6m
It finds the Python.h header but linking to the Python libraries causes Qt Creator to (apparently) use the Qt libraries of Anaconda and not the ones I downloaded and installed in my home folder.
This is problematic for two reasons:
My program needs Qt 5.9.1 and does not compile with Qt 5.6 (Anaconda's version)
Even if it compiled with Qt 5.6 there are suddenly errors of missing libraries, see below:
Is there any way to include Python from Anaconda but tell Qt Creator to use my custom Qt Version?
Unknowingly, I had the same problem again with a different application and thus posted a new question because I thought it was a different issue.
I found a solution in the mean time and posted the answer here.

Cannot add qmake files to Qt Versions [armhf]

I installed qt4-qmake:armhf and qt5-qmake:armhf but I cannot add it to Qt Versions in Qt Creator manually. I get error:
The qmake executable could not be added: qmake""is not an executable.
What else should I try?
I am using windows right now, but searching file list for the 2 packages in debian repository online it seems that that qmake is located in:
/usr/bin/qmake-qt4 for qt4
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
for qt5

Missing QtWebKit headers + modules

I'm a newcomer to Qt and I'm having a hard time embedding a web browser control in my application.
When I try to #include <QtWebKit> or #include <QWebView>, the compiler complains that neither of those header files exist. The same goes for QtWebKitWidgets, as well.
When I add QT += webkit or QT += webkitwidgets in my qmake .pro file, I get an error saying Unknown module(s) in QT: webkit.
How do I install these modules / headers so I can use QWebView in my application? (My Qt version is 5.2.1.)
Try to install qtwebkit from repository.
On Ubuntu: sudo apt-get install libqt5webkit5-qmlwebkitplugin libqt5webkit5
On ArchLinux: sudo pacman -S qtwebkit
You may be missing your distro's QtWebKit dev package. Double check that you have the headers. A good command for this is find /usr/include -iname "*qtwebkit*". You should get some files back, one of them should be called QtWebKit, and if you open it in a text editor, you should see the text of the header.
In some distributions, the QtWebKit headers are in a separate package from the base Qt development files. Make sure you have that package installed if applicable. I know that in Arch Linux and Manjaro, the packages you need are qt5-base and qt5-webkit, and if I remember correctly, Debian-based distros (Debian, Ubuntu, Linux Mint, etc) call those packages qtbase5-dev and libqt5webkit5-dev.
If you are missing the package and need help finding it for your distribution, you can try asking over on SuperUser.

Qt on Linux - version conflict?

Trying to move a Qt 4.6.3 project from Windows to Debian Linux (Etch). I've installed Qt by downloading the latest version, then running configure, then make install as root. Yet when I run qmake_qt4 on my project's pri file, here's what I get:
uic: File generated with too old version of Qt Designer
Running uic -v returns 4.2.1. How come? Wasn't make install supposed to put the latest Qt on the system?
By default, Qt installs to /usr/local/Trolltech/Qt-4.6.3 and doesn't add it's bin folder to your PATH variable. Also, it's just named qmake.
Either call /usr/local/Trolltech/Qt-4.6.3/bin/qmake using the complete path or add the /usr/local/Trolltech/Qt-4.6.3/bin/ path to your PATH variable and ensure that it is listed there before any other path that may have a qmake. Best thing to do is to uninstall the the debian qt version if you don't need it elsewhere.