QAbstract3DGraph Proxy Page | Qt Data Visualization | Qt 6.9.3

- Qt 6.9
- Qt Data Visualization
- QAbstract3DGraph Proxy Page
- Qt Data Visualization | Commercial or GPLv3

# QAbstract3DGraph Proxy Page

## Functions

int | qDefaultSurfaceFormat(bool antialias)

## Function Documentation

### int qDefaultSurfaceFormat(bool antialias)

This convenience function can be used to create a custom surface format suitable for use by Qt Data Visualization graphs.

The antialias parameter specifies whether or not antialiasing is activated.

Give the surface format returned by this function to the graph constructor (C++) or set it as the window format for QQuickView (QML) before calling `show()` on it.

For example, disable antialiasing on C++ application:

     #include <QtDataVisualization/qutils.h>

     // ...

     Q3DBars *graph = new Q3DBars(qDefaultSurfaceFormat(false));

For example, enable antialiasing for direct rendering modes on QML application:

     #include <QtDataVisualization/qutils.h>

     // ...

     QQuickView viewer;
     viewer.setFormat(qDefaultSurfaceFormat(true));

Note: Antialiasing is not supported in OpenGL ES2 environments.