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

Plotting 3D surface



  • Hello!
    I'm new to data visualization in QT, I created a program that does numerical calculation and stores it in a 2D vector.
    Now I want to visualize it as a 3D surface, I found an example at the documentation about that but I don't understand how to create the plot in a new widget. The example shows how to program all the UI in the main.cpp file, but I need the plot on a different window... How can I do this?

    I tried to create another class and copy there the relevant code but I get an error on the line:

        Q3DSurface *graph = new Q3DSurface();
    

    undefined reference to `__imp__ZN19QtDataVisualization16QAbstract3DGraph16setSelectionModeE6QFlagsINS0_13SelectionFlagEE'



  • Solve it...
    added to the .pro file

    QT += datavisualization