Unknown module(s) in Qt: 3danimation - qt

I am a beginner in Qt and wanted to learn about 3D rendering in Qt. The first thing the official document http://doc.qt.io/qt-5/qt3d-index.html stated was to add the following line to its qmake .pro file:
QT += 3dcore 3drender 3dinput 3dlogic 3dextras 3danimation
However, running qmake after adding this line gave me an unknown module error:3danimation. I read this previous posted question Unknown module(s) in QT. The solution stated to use
QT += 3dcore 3drender 3dinput 3dlogic
This solution worked for me but I have also read that 3danimation contains various important classes from the Qt3DAnimation module. My question is that why following the official documentation gave me this error. Did I miss something. This question may sound very nooby, but I would appreciate if someone could explain this to me. Thanks in advance. BTW, I am using Qt creator 4.2.0 (based on Qt 5.7.1).

Because the Qt5 documentation follows the latest release which is Qt 5.10 at the moment and you are using older release (5.7).
If you take a look at archived Qt3D in Qt 5.7 documentation you can see that 3danimation is not mentioned there. According to this blog post the technology preview of the Qt3D Animation module was released first time as part of Qt 5.9.
You should move to a newer release if you want to use Qt3D Animation. I would recommend Qt 5.9 which is LTS (long time support) release. At the moment, Qt 5.9.5 is the newest version.

Related

Where is the Qt binary file?

I'm on Manjaro based on Arch Linux.
I searched everywhere, and I cannot seem to find that binary file.
Searched /usr/lib/qt, used find and which commands, etc.
The only might-be relevant thing I found is in /usr/lib/qt6/bin/, I found a binary file called "qt-cmake". But I'm pretty sure that's not what I'm looking for.
My final goal is to install the latest release version of Qt Creator on GitHub, and installation needs to know the paths of two binary files :
Qt
Llfw
Installation guide precisely says "These instructions assume that Ninja is installed and in the PATH, Qt Creator sources are located at /path/to/qtcreator_sources, Qt is installed in /path/to/Qt, and LLVM is installed in /path/to/llvm."
There is no "Qt binary file" per se. Qt is a framework, delivered as a (large) group of libraries and header files.
The Qt installer should provide you with everything you need. I'm not sure this link will work for you, but...
Qt Installer
As an aside, Qt Creator is an IDE for building and testing Qt-based applications. It isn't clear to me why you'd need the sources for that.

Using glut with QT after update

I have a problem with update of my QT. I have decided to do an update from 5.2.1 to the newest, 5.8 version. Now I am trying to run my old project. There is something wrong with my graphic module, especially with functions connected with glut (I think so). I tried this week to solve this by myself, but now I am confused and tired.
Now I am using: Qt 5.8.0 for Windows 32-bit (MinGW 5.3.0).
Originally I had the following libs only in my .pro file, end it works in QT 5.2.1:
LIBS += -lglut
But now, in new version of QT, I am getting such errors:
Errors using the original project (with -lglut)
When I change:
LIBS += -lglut
Into:
LIBS += -lopengl32
I am getting only such errors:
Errors using -lopengl32
I do not know how to understand this "undefined reference". I see that glu.h is included in my project (as #include ). I can also see that "undefined" commands are recognized by the creator and glu.h is visible. I do not know how to solve this. Old QT 5.2.1. still is available in my computer and project successfully works. And also I have to tell You that I am not professional and I will be very grateful for any help and guidance.

Unknown module(s) in QT: declarative

Sorry, this may be a dumb question, but I'm totally new in QT, I just need to run a project and Log some data.
I installed Qt "qt-unified-windows-x86-2.0.3-2-online", open the project and then click on configure, and then I got this error:
Unknown module(s) in QT: declarative
which wont let me compile the code. Everything else looks fine.
From researching I get that I may lack some libraries, I'm using windows, How do I get the proper library in windows? which is the library I need?
I'm using "Qt Creator user the kit Desktop Qt 5.7.0 MinGW 32bit."
Thank you.
I'm downloading linux, a live version, to try to run the code in there
The error occurs when trying to build a project that depends on the deprecated QtDeclarative module on Qt version 5.6 and later, as the module was removed in version 5.6.
The source code for the module is still available you can compile it from source. Or you can install a Qt version below Qt 5.6 to build the project.
You probably don't have declarative library installed somehow, here it is recommended to use a command-line utility named windeployqt, something like
windeployqt -declarative

Qt 4.8.3 installation on Windows 7 & QtWebkit problems

I just updated my Qt to 4.8.3, because the program built from older version is not compatible to the new framework.
So I have to upgrade.
This process was frustrating and time consuming. So many problems came out.
I download Qt from this url:
http://qt-project.org/downloads
At beginning, I installed the MinGW one (I'm not a fan of MSVC).
I tried the newest ( I think it's 4.6) version of MinGW and order version (4.4).
However, after I installed MinGW and tried to install Qt 4.8.3, during the process, the following message shows up:
There is a problem with your MinGW installation:
The installer could not find a valid C:\MinGW\include\w32api.h (Only versions with W32API 3.13 are supported)
Do you still want to continue? (Your installation may not work)
The 4.6 version does have this w32api.h file, I don't know what's going on. And I have trouble finding MinGW 4.4 with this head file.
I decide to ignore this warning and continue to install Qt and Qt creator. After that,
I opened my current project, configure it (why the configuration become so complex...), I tried to build it.
Then the following message shows up because some external lib I used requires Exception Handling:
exception handling disabled, use -fexceptions to enable
And I don't know how to enable the it.
I tried to add -fexceptions flag in QMAKE_CXXFLAGS but it doesn't work.
By the way, I tried the VC version of Qt too, but I used the MinGW before and the VC compiler is quite different, if I use VC version, it will take a lot of time to make it compilable by VC compiler.
Does anyone know how to install Qt 4.8.3 on Windows? my project works fine before, now I just want to compile it successfully.......
These are not the only problem.
I updated the Qt on Mac machine too, it is easier to have the compiler work since it's unix base.
However, I used QtWebkit lib in my project and obviously, they changed this lib and it's not compatible to order version.
I can compile my project on Mac, however, every time I run it, following massage shows up and the program stopped.
dyld: Symbol not found: _OBJC_CLASS_$_CALayerHost Referenced from:
/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit Expected
in:
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
The program has unexpectedly finished.
Does any one know how to solve this QtWebKit problem? I'll really appreciate.
I remembered that when Qt is under nokia, it's so easy to install and use, the Qt SDK is perfect.
I really hate the change made after it was bought by digia.........
I found solutions of my first two problems:
for the first problem, as I described, download the MinGW provided by Nokia Qt
ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip [ftp.qt.nokia.com]
Tried several versions of MinGW 4.4, I think this is the only one works.
About the second problem, add following configure in the project file:
CONFIG += exceptions
Now the QWebKit problem is only one unsolved.
Is it all relevant that your include directory for MinGW has two "i's" in it or was that a typographic error when posted on SO? See:
The installer could not find a valid C:\MinGW\iinclude\w32api.h

Installing OpenGL for Qt

I just have installed Qt 4 on windows 7. I am now in a bit of a confusion
How do I get to install OpenGL so that it works with QT? Is there an installer for OpenGL?
Qt docs. say it has support for OpenGL, but when I include QTOpenGL and build, the compiler issues an error of "No such file or directory"
Thanks for the reply in advance!
Are you sure you followed this to the letter? You need to include <QtOpenGL> and set the QT += opengl option in your pro file.
What tool chain are you using? (Visual Studio, Qt Creator/g++) You need to specify somewhere in your project settings that you want to use the QtOpenGL module. This will result in a line in your .pro file similar to this:
QT = core gui opengl
This causes qmake to add the proper include path when invoking the compiler (I believe).
added the line QT += opengl to the .pro file

Resources