Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

3D line plot using QML



  • Hi, I'm developing a Qt Desktop C++ GUI application using Qt Creator IDE (Qt 5.13) and I don't know nothing about QML programming.

    Inside my C++ application, I will have to create a function that generates a 3D LINE plot like this example image below:

    9111009c-c917-4e3b-8008-28cebf0f960a-image.png

    Besides that, I need to interact with the plotted 3D data too:

    • 3D point mouse selection
    • 3D rotation
    • Zoom

    QUESTIONS:
    a) Is it possible to do it using QML?
    b) Is there any source-code example about 3D LINE plot (not a 3D surface)?



  • @fem_dev not that I've used it myself, and also it's an old project as it seems, but maybe Qwt3DPlot may help you somehow.



  • @Pablo-J-Rogina I tried, but it is stoped in time in Qt 3 and 4...and it doesn't have a 3D line plot...



  • QSGGeometry
    "Vertices can be as simple as points defined by x and y values or can be more complex where each vertex contains a normal, texture coordinates and a 3D position."

    Check out the "Scene Graph - Graph" demo. You "should"(tm) be able to extend that to 3D. I have used it for 2D myself, but not yet 3D. YMMV



  • I don't know what it would take to rotate the view though.

    Edit:
    transform



  • Played QSGNode based code over the weekend. I think I saw something about each node having a transform. So you could build up a scene controlled by one QSGNode similar to the line drawing demo. Then transform that to rotate that within the scene.


Log in to reply