simvx.graphics.platform._qt

PySide6 windowing backend.

Module Contents

Classes

QtBackend

WindowBackend implementation using PySide6.

Data

API

simvx.graphics.platform._qt.log[source]

‘getLogger(…)’

simvx.graphics.platform._qt.__all__

[‘QtBackend’]

class simvx.graphics.platform._qt.QtBackend[source]

WindowBackend implementation using PySide6.

Initialization

create_window(width: int, height: int, title: str) None[source]

Create a QWindow with Vulkan surface.

create_graphics_surface(instance: Any) Any[source]

Create a Vulkan surface from the QWindow.

get_required_instance_extensions() list[str][source]

Return platform-specific Vulkan extensions needed.

poll_events() None[source]

Process Qt events.

should_close() bool[source]

Check if window should close.

get_framebuffer_size() tuple[int, int][source]

Get window framebuffer size.

set_mouse_button_callback(callback: collections.abc.Callable[[int, int, int], None] | None) None[source]

Register mouse button callback.

get_cursor_pos() tuple[float, float][source]

Get current cursor position.

set_window_size(width: int, height: int) None[source]

Resize the window.

get_window_size() tuple[int, int][source]

Get window size (may differ from framebuffer size on HiDPI).

get_content_scale() tuple[float, float][source]
set_title(title: str) None[source]

Update the window title bar.

set_key_callback(callback: collections.abc.Callable[[int, int, int], None] | None) None[source]

Register keyboard callback (key, action, mods).

set_cursor_pos_callback(callback: collections.abc.Callable[[float, float], None] | None) None[source]

Register cursor position callback.

set_char_callback(callback: collections.abc.Callable[[int], None] | None) None[source]

Register character input callback.

set_cursor_shape(shape: int) None[source]

Set cursor shape. 0=arrow, 1=ibeam, 2=crosshair, 3=hand, 4=hresize, 5=vresize.

request_close() None[source]

Request the window to close.

poll_gamepads() list[tuple[int, dict[str, bool], dict[str, float]]][source]

Poll gamepads — not supported in Qt backend.

destroy() None[source]

Clean up Qt resources.