Visual Studio 2013 and Qt3D module
-
Hello everyone,
i'm not able to use the checkBox to add Qt3D module support to my visual studio Qt Projets (it's grayed, there is no tooltip), and i failed to find informations about this.
Anyone can explain me why ?I use Qt 5.5 msvc 2013 64 bits, with visual studio 2013 and visual studio addin v1.2.5.
(same problem with visual studio tools v 2.1.1)Maybe it's just not yet implemented in VS Tools yet: You can do it "by hand". Just add:
QT += 3dcore 3drender 3dinput 3dextras
to your .pro file. Depending on other things you use in your program, on WINDOWS, may need to add: LIBS += -lopengl32 as well.
-Michael.
-
In VS15 I did it this way. I don't use the english version, so my translation can differ
-right click on the project in the projext explorer
-properties
-choose "configuration"/"C/C++"/"general"
-edit the entry "additional Includes" and add:
$(QTDIR)\include\Qt3DExtras
$(QTDIR)\include\Qt3DRender
$(QTDIR)\include\Qt3DLogic
$(QTDIR)\include\Qt3DInput
$(QTDIR)\include\Qt3DCore -
So ! I have created a new Qt5 Application Projet.
I added these includes :
$(QTDIR)\include\Qt3DRender
$(QTDIR)\include\Qt3DLogic
$(QTDIR)\include\Qt3DInput
$(QTDIR)\include\Qt3DCore
(I don't have any Qt3DExtras folder here)
I added these libs to the linker :
Qt53DCore.lib
Qt53DRenderer.lib
Qt53DInput.lib
Qt53DLogic.lib
(no Qt53DExtras.lib either here)And this code crash at launch.
#include <QGuiApplication> #include <Qt3DRenderer/QWindow> int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); Qt3D::QWindow view; view.show(); return a.exec(); }
did i do something wrong ?
The call stack by the way :
opengl32.dll!glGetIntegerv() qwindowsd.dll!QWindowsGLContext::QWindowsGLContext(QOpenGLStaticContext * staticContext, QOpenGLContext * context) qwindowsd.dll!QOpenGLStaticContext::createContext(QOpenGLContext * context) qwindowsd.dll!QWindowsIntegration::createPlatformOpenGLContext(QOpenGLContext * context) Qt5Guid.dll!QOpenGLContext::create() Qt53DRendererd.dll!Qt3D::Render::Renderer::initialize(QOpenGLContext * context) Qt53DRendererd.dll!Qt3D::Render::RenderThread::run() Qt5Cored.dll!QThreadPrivate::start(void * arg) msvcr120d.dll!_callthreadstartex() msvcr120d.dll!_threadstartex(void * ptd) kernel32.dll!0000000077a759cd() ntdll.dll!0000000077baa561()
One more detail, i got theses errors with the same code under QtCreator :
Qt3D.Core.Nodes: void Qt3D::QEntity::addComponent(Qt3D::QComponent*) Qt3D::QCameraLens(0x3e2b50) Qt3D.Core.Nodes: void Qt3D::QEntity::addComponent(Qt3D::QComponent*) Qt3D::QTransform(0x3e2b60) Failed to load scene parser plugin "C:/Qt/Qt5.5.1/5.5/mingw492_32/plugins/sceneparsers/assimpsceneparser.dll" Failed to load scene parser plugin "C:/Qt/Qt5.5.1/5.5/mingw492_32/plugins/sceneparsers/gltfsceneparser.dll"
-
Hi,
There's something fishy here, your title talks about VS2013 but you are using a MinGW installation of Qt. So all in all which one is it ?
-
You are aware that you can also use Qt Creator to build your application with the VS2013 compiler ?