Qt 3d example error
-
Hello everyone, I'm trying to build an open source file named as cube sphere textures from GitHub which is under qt3d-example open source library. But there are errors which aren't getting resolved. i have tried to solve it with few solutions but that doesn't help me. I also don't know where am I going wrong.
I'm attaching the screenshot of the code snippet where the errors are occurring. please help me resolve the error. looking forward for the help. It would be really grateful if someone helps me out to resolve the issue.
-
Hello everyone, I'm trying to build an open source file named as cube sphere textures from GitHub which is under qt3d-example open source library. But there are errors which aren't getting resolved. i have tried to solve it with few solutions but that doesn't help me. I also don't know where am I going wrong.
I'm attaching the screenshot of the code snippet where the errors are occurring. please help me resolve the error. looking forward for the help. It would be really grateful if someone helps me out to resolve the issue.
In Qt6 the
QBuffer
's been moved the theQt3DCore
module. Same forQAttribute
. I assume you're working with an example that's not been ported. You must change the type names accordingly.https://doc.qt.io/qt-6/qt3dcore-qbuffer.html
https://doc.qt.io/qt-6/qt3dcore-qattribute.html -
In Qt6 the
QBuffer
's been moved the theQt3DCore
module. Same forQAttribute
. I assume you're working with an example that's not been ported. You must change the type names accordingly.https://doc.qt.io/qt-6/qt3dcore-qbuffer.html
https://doc.qt.io/qt-6/qt3dcore-qattribute.html@kshegunov thank you for replying, yes thats true, I did see that the QBuffer and QAttribute are present in Qt3DCore but what i did was moved those two files into Qt3DRender folder and then tried to build but it still gives me the same error. what are your thoughts on this and how can i solve the error?
-
In Qt6 the
QBuffer
's been moved the theQt3DCore
module. Same forQAttribute
. I assume you're working with an example that's not been ported. You must change the type names accordingly.https://doc.qt.io/qt-6/qt3dcore-qbuffer.html
https://doc.qt.io/qt-6/qt3dcore-qattribute.html@kshegunov hie you are right, and now i did change the header file that is #include Qt3DRender::QBuffer to Qt3DCore::QBuffer and few errors got solved which where related to undefined error, but there are few errors which im not understanding how to solve. i will attach the image below, if anyone could help me out to resolve would be grateful and indeed helpful
-
@kshegunov hie you are right, and now i did change the header file that is #include Qt3DRender::QBuffer to Qt3DCore::QBuffer and few errors got solved which where related to undefined error, but there are few errors which im not understanding how to solve. i will attach the image below, if anyone could help me out to resolve would be grateful and indeed helpful
@RUXX There is no VertexBuffer in that class anymore. Check https://doc.qt.io/qt-6/qt3dcore-qbuffer.html#QBuffer and adjust your code accordingly.
-
@kshegunov hie you are right, and now i did change the header file that is #include Qt3DRender::QBuffer to Qt3DCore::QBuffer and few errors got solved which where related to undefined error, but there are few errors which im not understanding how to solve. i will attach the image below, if anyone could help me out to resolve would be grateful and indeed helpful
I think they dropped the distinction, so now you have just buffers whose meaning is determined by the way they're bound.
-
can anyone tell me where can i modify things in my code to resolve the above errors. i did go through the link provided by @jsulm but i couldn't understand where to modify things. It would really be helpful if someone can help me out in this.
@RUXX said in Qt 3d example error:
can anyone tell me where can i modify things in my code to resolve the above errors
The error messages actually tell you the exact file and line number. And from the error message and the link I gave you it should be clear that it is about the Qt3DCore::QBuffer constructor. So, simply check how the constructor looks like now (in the link I gave you) and change the code accordingly. Hint: you need to remove the VertexBuffer parameter from the constructor call...
-
@RUXX said in Qt 3d example error:
can anyone tell me where can i modify things in my code to resolve the above errors
The error messages actually tell you the exact file and line number. And from the error message and the link I gave you it should be clear that it is about the Qt3DCore::QBuffer constructor. So, simply check how the constructor looks like now (in the link I gave you) and change the code accordingly. Hint: you need to remove the VertexBuffer parameter from the constructor call...
-
@jsulm thank you for providing solution but when i tried the solution as per you mentioned I'm getting total of 90 errors that looks something like this,
@RUXX So, did you add (like the documentation shows, which you should consult)
#include <Qt3DCore/QBuffer>
to cubesphere.cpp?
And please if you post errors always post them as text, not pictures. And always post the very first error message.
-
@RUXX So, did you add (like the documentation shows, which you should consult)
#include <Qt3DCore/QBuffer>
to cubesphere.cpp?
And please if you post errors always post them as text, not pictures. And always post the very first error message.
-
@jsulm yes i have included <Qt3DCore/ QBuffer> in .cpp file.
Sorry for the inconvenience caused, i will keep it in mind while posting errors.@RUXX said in Qt 3d example error:
yes i have included <Qt3DCore/ QBuffer> in .cpp file
Does it work now or did you already include it before and it does not build?
-
@RUXX said in Qt 3d example error:
yes i have included <Qt3DCore/ QBuffer> in .cpp file
Does it work now or did you already include it before and it does not build?
-
@RUXX said in Qt 3d example error:
The errors are given below: ....\projects\cubespheretextures\src\cubesphere.cpp:58: error: C2065: 'VertexBuffer': undeclared identifier
This was already explained before, I will not repeat the explanation...
-
@RUXX said in Qt 3d example error:
The errors are given below: ....\projects\cubespheretextures\src\cubesphere.cpp:58: error: C2065: 'VertexBuffer': undeclared identifier
This was already explained before, I will not repeat the explanation...