Modules
Spatial
Show existing widgets in perspective, with a flat layout when needed.
Create a view
Link FluentQt::Spatial, activate a SpatialSession, and create a SpatialView. SpatialView::addWidget() wraps a widget in a SpatialItem that sets its position, rotation, and depth. The widget still takes mouse and keyboard input.
#include <FluentQt/Spatial.h>
// The session uses its own PluginManager; window stays caller-owned.
auto* session = new fluent::spatial::SpatialSession(window, window);
if (session->activate()) {
auto* view = session->createView(parentWidget);
fluent::spatial::SpatialItem* item = view->addWidget(card); // borrowed by default
}from fluentqt.spatial import SpatialSession
# The session uses its own PluginManager; window stays caller-owned.
session = SpatialSession(window, window)
if session.activate():
view = session.createView(parent_widget)
item = view.addBorrowedWidget(card)Renderer and flat mode
setRenderMode() requests Auto, Raster, or OpenGL. If OpenGL is unavailable, the view falls back to Raster and stays in perspective; activeBackend() and fallbackReason() report the result. setSpatialEnabled(false) puts the same widgets back in a normal vertical layout. Reduced motion, high contrast, and pressing Tab or Esc in the scene also switch to this flat mode. Use it for text input, popups, and accessibility.