slint::select_backend Function
void slint::select_backend(const BackendRequirements &requirements={})
Selects one of Slint’s built-in backends with a renderer ↗ that meets requirements, and makes it the active backend. This is a programmatic substitute for the SLINT_BACKEND environment variable.
Call this before creating any component or window. For example, to render with desktop OpenGL 3.2 or newer:
slint::select_backend({ .graphics_api = slint::GraphicsAPI::OpenGL, .min_opengl_version = { { 3, 2 } } });auto app = App::create();C++
Aborts the program with an error message if the requirements can’t be met, or if a backend is already active.
© 2026 SixtyFPS GmbH