I have self-compiled Qt 5.4.1 and installed in /opt/qt-5.4.1.
However, I encountered an error while trying to 'qmake' my project file:
Project ERROR: Unknown module(s) in QT: webkitwidgets
I did sudo apt-get install libqt5webkit5-dev but the error persists.
I suspect then that apt-get install does not work when Qt-Core was self-compiled. The Qt Webkit source is available on https://qt.gitorious.org/qt
The question is, how and where should I install Webkit from source so that it can be detected while running qmake?
Probably you missed compilation of webkit while compilation of Qt. Read here how to resolve this issue:
https://forum.qt.io/topic/40378/solved-linux-unknown-module-s-in-qt-webkitwidgets
QtWebKit is not built anymore by default. You can build it after you have a proper build of Qt. Once you have your build of Qt clone the QtWebKit repo:
git clone https://github.com/qt/qtwebkit.git
then, make a new dir for the build files and from that directory enter the command:
/opt/qt-5.4.1/bin/qmake <path/to/qtwebkit>
make -j<n>
make install
Now you should be able to use QtWebKit with your build.
might want to try:
sudo apt-get install libqt5webkit5
and
sudo apt-get install libqt5webkit5-dev
Related
I installed a fresh new copy of QTCreator on a Ubuntu VM. It is a clean virtual machine. Then I create a dummy QTQuick project with almost nothing in it. But creator fails to compile, saying CMAKE_CXX_COMPILER not found. See message below:
error: No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by
setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER
to the full path to the compiler, or to the compiler name if it is in the PATH.
Am I missing the compiler? This is a fresh install and I don't understand. Creator is showing the only compiler option. See the screen shot below:
Any ideas why it does not compile from a clean install, using all default option? The compiler must be there.
thank you.
I followed these instructions and it worked finally.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5
downloaded the install and made it executable
chmod +x qt*.run
then it worked.
Here is the page with more explanations:
https://web.stanford.edu/dept/cs_edu/resources/qt/install-linux
I am trying to update Qt from 5.5.1 to 5.7 or higher.
I tried sudo apt-get install qt-default qtdeclarative5-dev
gives me following output on console:
qtdeclarative5-dev is already the newest version (5.5.1-2ubuntu6).
qt5-default is already the newest version (5.5.1+dfsg-16ubuntu7.6).
How can I update Qt to 5.7 or higher version?
Ubuntu packages in standard repository are always outdated. I suggest you install Qt from .run file they provide .
But you can possibly run into problems, as i did, using Qt + CMake without Qt Creator
I followed this post and was able to update Qt to 5.11 using PPA following commands:
sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial
sudo apt update
sudo apt install qt511-meta-full
For system wide usage, create default.conf file at /etc/xdg/qtchooser with following content:
/opt/qt511/bin
/opt/qt511/lib
That's it, it should be updated by now. qmake -v outputs the current Qt and qmake version
I installed qt5-default on my Odroid XU3 using the the sudo apt-get install qt5-default command and wanted to run qmake-qt5 using the terminal but it printed that this command is unknown. Then I looked in the usr/share/qt5 folder and noticed that there is only the doc-foder inside. I also looked in the usr/bin folder and could only find qmake-qt4 but no qmake-qt5. When I run the install command, I also read that some libraries will be installed, so I think, libraries are not the problem.
Next I tried to install qmake-q5t manually from this page https://launchpad.net/ubuntu/trusty/+package/qt5-qmake but then I got a message that there is a newer version of qmake-qt5 already installed. I searched the whole system using the find command for qmake-qt5 but couldn't detect it.
Last I also tried to add the ubuntu-sdk ppa using as described here https://askubuntu.com/questions/279421/how-can-i-install-qt-5-x-on-12-04-lts but this also didn't work out.
Does it have something to do with my Odroid or with Lubuntu? Is there any other way to install qmake-qt5?
I tried to compile and make with the already installed qt4 and this did work out using
qmake-qt4 -project
qmake-qt4
make
./helloworld
I want do the same but only with qt5
Thanks in advance
The qmake executable is installed in /usr/lib/<your_arch>/qt5/bin as qmake (no -qt5 suffix).
You can check with qmake --version, it should report you a Qt version 5.x.x
I installed QT creator in debian linux. If I try to create a new project, in Kit option I got the error like "No valid Kit found". If I go to Tools ->Options -> Build&Run -> kit, there is no options to select. But I installed same in ubuntu, it is working fine without same problem. What im missing?
Also suggest me if I need to reinstall the QT creator or something else...
Its time to explain the tricks to install QT creator in debian linux operating system.
STEP 1: dont install just QT creator in your PC.
Install whole package of QT [link to download QT SDK below][1]
[1]: http://www.qt.io/download-open-source/#section-2 , so that you will get all the libraries and dependencies.
After downloading the file is in the ".run" format . Install the downloaded file in your terminal (by giving commands).
STEP 2: install
sudo apt-get install g++
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
in your terminal.
STEP 3: install
sudo apt-get install libcanberra-gtk-module
sudo apt-get install libcanberra-gtk-module:i386
now restart your system once and create new project.It should work
I like to thank agold for his guidance , Actually he spent more than 3 hours to resolve this issue. :)
Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error:
error: Unknown module(s) in QT: svg
Any ideas?
You are lacking the installation of the the QtSvg library. Try to install them on your Ubuntu 13.10 in the following way:
sudo apt-get install libqt5svg5*
Debian Stretch:
sudo apt install libqt5svg5-dev
Fedora (courtesy of #robin-green):
sudo dnf install qt5-qtsvg-devel
Because zsh complains to me about "no matches found" when using lpapp's answer, I would like to add here:
On Debian Systems one can get the required library for release builds via:
sudo apt install libqt5svg5
and if one also wants to build a debug build one requires:
sudo apt install libqt5svg5-dev
additionally.