I'm trying to install opencv (2.4.5) with Qt in my fresh Ubuntu 13.04.
I've downloaded opencv, executed:
ccmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ../opencv-2.4.5
../opencv-2.4.5 is the folder of the opencv source
and in ccmake I changed the WITH_QT variable to YES
than make and sudo make install
But now if in kdevelop I try to execute my test code (I only call addText(...) over an image). I get the following error:
OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in fontQt, file...
What I'm doing wrong?
Thanks in advance for any suggestion
edit: I had both qt4 and qt5 due to the QtCreator installation.
For a fast solution I removed qt5 and qtcreator and reinstalled opencv.
Now it works, but is there a cmakelist for opecv that enable to use qt5?
Have you looked at This Using CMake with Qt 5
I'm not sure if I should answer my question, anyway:
If you look at the github repository of OpenCV, 4 days ago the CMakeList.txt has been updated to support Qt5.
So the solution is to clone the project and install it from source.
I tested it and it works.
Related
I have installed qt-creator on windows 10 using msys2.
I installed packages according to https://wiki.qt.io/MSYS2
base-devel git mercurial cvs wget p7zip
perl ruby python2 mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
mingw-w64-i686-qt-creator mingw-w64-x86_64-qt-creator
I had previously installed qt from the official site but the mingw version is too old and I'd rather not have two mingw versions installed.
I have existing C:\msys64\mingw64\share\qt5\examples folder but it seems there are some folders missing from C:\msys64\mingw64\share\qt5\doc compared to the official install. Maybe that has something to do with it.
So the question: Is there a specific package I need to install so that the examples show up in the qt-creator examples page or something else?
I found in this place https://www.archlinux.org/packages/extra/any/qt5-examples/
decompress with
zstd -df qt5-examples-5.14.2-1-any.pkg.tar.zst
and then
tar xzf qt5-examples-5.14.2-1-any.pkg.tar
the examples are saved in /usr/share/doc/qt/examp,es
The qt-creator in msys2 distribution do not have examples installed. The msys2 also do not have separate package for it.
But as what #user3930978 found. You can use example package from archlinux site for workaround.
But unfortunately, msys2 qt5 configured with "-nomake examples" parameter. You need to modify generated file. The easiest way is still to install qt5 and creator with official full pack.
I've been using OpenCV and Marble libraries compiled and linked with Qt. Every time I do it I have problems running cmake to make these libraries. it seems paths in the qt cmake files to other qt cmake files are incorrect. I get errors like:
CMake Error at CMakeLists.txt:67 (find_package):
By not providing "FindQt5DBus.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5DBus", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5DBus" with any
of the following names:
Qt5DBusConfig.cmake
qt5dbus-config.cmake
Add the installation prefix of "Qt5DBus" to CMAKE_PREFIX_PATH or set
"Qt5DBus_DIR" to a directory containing one of the above files. If
"Qt5DBus" provides a separate development package or SDK, be sure it has
been installed.
I can fix this in Ubuntu by running
sudo apt-get install qt5-default
This is fine in Ubuntu, but now I am trying to compile these libraries on mac and windows now. Anyone know a way to get a Qt with all of these paths already correct? tried the installer on windows and mac, and brew on mac. I don't really have time to play with fixing each one of these errors one by one
At least Qt 5.5 on Windows (using the Qt installer) should work out of the box. It has DBus included. Which Qt version are you using currently?
I am trying to get qt webengine running on my laptop for the first time, but can't seem to build it. I am following the instructions from here:
https://wiki.qt.io/QtWebEngineHowToTry
On the last few steps, I had to run "qmake -r" on the qtwebengine directory. This is the output:
SSL............................... Using system NSS
ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG += use_system_icu)
FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG += use_system_ffmpeg)
Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)
Reading /home/kevin/workspace/qtwebengine/src/src.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core_gyp_generator.pro
Project ERROR: Unknown module(s) in QT: webchannel
This error happened right after I installed WebKitGtk+ from here (http://trac.webkit.org/wiki/BuildingGtk) and ran "Tools/gtk/install-dependencies" and "Tools/Scripts/update-webkitgtk-libs". Before I installed WebKitGtk+, qmake would terminate at a later point.
(I installed WebKitGtk+ because, previously, running "qmake -r" on the qtwebengine directly resulted in an "unmet dependency: harfbuzz" error that I tried to fix on my own via google, and the WebKitGtk+ page was the only lead I could find that would supposedly fix that issue... big mistake!).
I am running on a (mostly freshly reformatted) Ubuntu 15.04 laptop. I installed qt5 via apt-get install, but apparently I have both qt4 and qt5 plugins installed, as well as qtchooser (I'm guessing from the WebKitGtk+ installation scripts).
Here is the output of "qmake --version":
QMake version 3.0
Using Qt version 5.4.1 in /usr/lib/x86_64-linux-gnu
Any help would be greatly appreciated, as I'm excited to try out qt webengine!
In case anyone else has the same problem, I fixed it by installing qt 5.5.0 from here http://download.qt.io/official_releases/qt/, and using the associated qmake binary from that installation. I guess installing qt from 'sudo apt-get install' still has some issues that won't work with qtwebengine.
I'm trying to run a simple client example using QTWebsockets using Qt Creator, already add the
QT += websockets
But it throws this when i run build or qmake
:-1: error: Unknown module(s) in QT: websockets
I tried
QT += core websockets
Then realized that since installed Qt Creator from the repositories it wasn't up to date, so I reinstalled it from the Qt website but the problem persisted, I then ran pkg-config --modversion QtCore and it returns 4.8.6, thing is, in the QT version tab of qt creator it shows 5.4.1 to GCC compiler which is the compiler I’m using, in /opt/Qt/5.4/gcc_64/lib there is the QT5WebSockets module even in the help tab are listed the QT5 modules but I can't use them.
Tried with SerialPort and it didn't work, tried with Opengl and it worked which means is a version problem but I can't seem to find how to solve.
sudo apt-get install libqt5websockets5-dev
I solved it, the problem was that I just opened the project I made with qt4, when I tried to build it in the freshly installed qt creator the .pro.user file kept pointing to all qt4.
Solution, create a new project and add the source from the first, or change all the references from qt4 to qt5.
sudo zypper install libqt5-qtwebsockets-devel
Windows 7: I have installed Qt 4.8.4 Win and Qt Creator 2.6.2 Win, VS2010 (from here). When I try to open a project (previously compiled with Qt 4.8.3 / Creator 2.5.2), it says I need a kit (no valid kit) and eventually I end up at Qt version is not properly installed. All is shown in the screenshots below.
I have checked some solutions:
SO QT version is not properly installed, please run make install is for Linux
Some say, I need to install Qt SDK, but where do I find this (this one contains older Creator / Qt versions), and what sense would the individual installers make if I need SDK?
Some say, I need to add Qt to path, but what exactly? Creator? The Qt 4.8.4, the qmake dir?
Somehow I fail with this make install, nothing happens.
I have installed the 5.0.1 including Creator 2.6.2 as one installation, this works. But when I then download 4.8.4. and try to add it as QT Version, same issue: Qt version is not properly installed
Any idea what I would need to do or install.
-- Edit -- List of trials ---
Added my Qt 4.8.4 and its qmake dir to PATH
Re-installed Qt in different order: Qt 4.8.4 first / Creator 2.6.2 thereafter
Opened Qt CMD Prompt qmake install (as in the suggestions): 4.8.4\install:1: Parse Error ('INSTALLING Qt Source Package Version 4.8.4.') Error processing project file: install
qmake install from Qt CMD. Runs 20 minutes, Laptop gets extremly hot, then it crashes
P:\Qt\Libs\4.8.4>qmake\qmake.exe install
QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: install
I had the same problem. Try to choose "qmake.exe" from the BIN folder, not the qmake folder, so in your case probably P:\Qt\Libs\4.8.4\bin\qmake.exe
Based on SO: How to install Qt on Windows after building? I eventually got to http://qt-project.org/doc/qt-4.8/install-win.html
Simply running configure solved it for me, I did not build, nothing else. The installer did apply several patches, so I still do not get why I have to run configure.