Important: Please read the Qt Code of Conduct -

How to set the Z-axis length of Q3DSurface

  • Hello,

    I have a little problem and hope you are able to help me: I use Q3DSurface to do a real-time 3D data display. However, since the X-axis data is inconsistent with the data interval of the Z-axis data, the displayed 3-dimensional graphics are not intuitive enough, and the Z-axis length is too small.Just as the picture below, Is there have a way to set the length of Z-axis to become longer and not change the value range of Z-axis.
    I hope that I could convey my problem. If not, just ask me :)



  • Hi,

    I know this thread is already a bit old, but since I had the same problem recently and found no solution here, I thought I´d share mine for the the next one thats looking here.

    Instead of changing the length of the Axis you can change the default automatic HorizontalAspectRatio to a self defined value by using the setHorizontalAspectRatio function from the QAbstract3DGraph class:

    E.g.: graph->setHorizontalAspectRatio(1.0); //for a quadratic appearance.


Log in to reply