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.
Related
I need to install the qt4 C++ framework for one of my classes. I tried using the regular installer from the download archives page for both qt4.7 and qt4.8, however I get the warning:
"Installing this package may damage your system, and the installation may fail."
So I looked into installing it via homebrew and initially tried:
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt#4
However, that gives me this error:
Error: Calling brew tap-pin user/tap is disabled! Use fully-scoped user/tap/formula naming instead.
I looked online for a solution and was able to install it by omitting the brew tap-pin cartr/qt4 command:
brew tap cartr/qt4
brew install qt#4
I then tried to create a sample qt program in the CLion IDE and checked the version I was using, and it said I was using qt5 (from the python anaconda distribution). So my question is, can I install both qt4 and qt5 on my system simultaneously? How do I select which version to use?
You can install both simultaneously. You can select which to use.
When you install qt (meaning qt5) using homebrew, it produces a "Caveats" message that answers your question.
It says will need to set certain environment variables yourself.
It says that, in only those shell sessions where you set those environment variables, qt (meaning qt5) will be available.
It says, if you want qt always available, then you can simply put those settings in your dot files.
If you install qt#4 and set those same variables to point to qt#4, then qt#4 will be available instead.
You can view the same "Caveats" message again using brew info qt. Here is the whole message:
qt is keg-only, which means it was not symlinked into /usr/local,
because Qt 5 has CMake issues when linked.
If you need to have qt first in your PATH run:
echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.zshrc
For compilers to find qt you may need to set:
export LDFLAGS="-L/usr/local/opt/qt/lib"
export CPPFLAGS="-I/usr/local/opt/qt/include"
For pkg-config to find qt you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"
The same commands with qt#4 made qt#4 available for me:
export PATH="/usr/local/opt/qt#4/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/qt#4/lib"
export CPPFLAGS="-I/usr/local/opt/qt#4/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt#4/lib/pkgconfig"
By the way, I installed qt#4 using the user/tap/formula syntax: brew install cartr/qt4/qt#4
I am installing OMNET++ 5.1.1. However, during the installation, it is reported that:
configure: error: Cannot build Qt apps, probably due to missing or too old Qt packages. Make sure Qt development packages are installed and newer than Qt 5.4. You can disable Qtenv by setting the WITH_QTENV variable to "no" in configure.user.
Then I download and install the Qt from https://www.qt.io/download/. But it still report the same problem. How can I solve this problem ? Thank you.
I assume you're running some kind of GNU/Linux, because on Windows and macOS, the bundled Qt libraries should just work.
Try installing the Qt5 development packages using your distro's native package manager, then they should be detected.
If you can't, or they are too old, take a look in the configure.user file, and adjust the value of the QT_PATH variable according to the instructions there.
EDIT:
Since the OS was clarified: On Windows, you don't need to download Qt, or any other library separately. They are all bundled with the OMNeT++ distribution, and should work fine.
Just make sure you always use the included mingwenv shell to install and run OMNeT++. In it, the environment variables are set up as necessary.
If you are installing OMNET++ on windows make sure you extract the zip file to a folder other than "Program Files" and deactivate your antivirus during the installation process.
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?
Up until Anaconda3 (which contains Python 3.4) was re-installed on my RedHat 6.5 workstation, I have been able to develop Python apps that use PyQT5.
Post re-install of Anaconda I receive an error message:
....could not find or load Qt platform plugin xcb
The only difference between Anaconda installs is the folder name: /usr/local/ananaconda3 vs /usr/local/anaconda_py3
I checked libqxcb.so has no missing dependencies.
I rebuilt PyQT5.
I tried explicitly adding location of site-packages of PyQT5:
import site
site.addsitedir("...path.../python3.4")
Any other suggestions?
How does re-installing Python impact the use of PyQT5?
This is an error caused by having two different versions of Qt under the same installation/environment.
Check the packages installed and their versions in your environment (if for some reason you're not working in a virtual environment, you can skip the first line):
source activate yourenvname
conda list
If you see pyqt and qt both with version 4.X.X then remove them (assuming you want to work in Qt v5):
conda remove qt
conda remove pyqt
I had an issue that seems to match what happened here.
But in my case the solution was to "sudo rm -rf user/anaconda3" and reinstall it with "bash anaconda....sh", because I had previously installed it using sudo ("sudo bash anaconda....sh")
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.