Qenba Browser
Technologies Used
Software Info
Qenba separates concerns into three distinct layers that communicate through well-defined interfaces.
The Slint UI layer owns the declarative window definition, including the collapsible vertical tab bar, title bar controls, and resizable split layout. Slint compiles these definitions into native rendering instructions, so the chrome itself carries no browser overhead.
The Application Controller sits in C++ and coordinates active tab state, side panel URLs, and window geometry. The core problem with embedding WebView2 as a child window is that its position and size must be kept in sync with the Slint layout manually, since Slint has no knowledge of the native HWND. The controller handles this synchronization on resize events, clamping the WebView2 bounds to match the content area reported by Slint.
Internal pages (qenba://home, qenba://settings) are resolved to local HTML/CSS/JS files inside the /config directory. These pages call back into C++ through three asynchronous window bindings: window.updateConfig to persist JSON, window.getConfig to retrieve it, and window.onStateUpdate which the controller fires to notify the Slint tab bar of navigation events (title, URL, favicon) inside any active WebView2 instance.
This avoids running a localhost HTTP server entirely: no port management, no CORS complications, and no origin restrictions on HTML5 storage APIs.
Software Specifications
System Requirements
Supported Formats
Key Features
Native C++20 core with hardware-accelerated Slint UI chrome
Hybrid architecture separating native chrome from web-rendered internal pages
Asynchronous window bindings (updateConfig, getConfig, onStateUpdate) bridging HTML to C++
Custom internal protocol resolving qenba:// URLs to local config files
Collapsible vertical tab bar with concurrent AI assistant side panel
JSON-backed persistent configuration for themes, home URL, and AI engine selection
HTTPS/HTTP and qenba:// address bar security indicators
Automated async favicon caching
Architectural Implementation
Slint-WebView2 Geometry Synchronization
WebView2 runs as a native HWND child window outside Slint's render tree. On every Slint layout resize event, the Application Controller queries the Slint content area bounds and sets matching RECT coordinates on the WebView2 HWND via SetWindowPos. This keeps the web content pixel-aligned with the declarative Slint layout without any wrapper overhead.
Custom Internal Protocol Resolution
Rather than spinning up a localhost server, qenba:// URIs are intercepted by a WebView2 navigation handler. The handler strips the scheme, resolves the path to a file inside /config, and loads it directly. This preserves full HTML5 storage API access (localStorage, sessionStorage) and avoids the null-origin restrictions that data: URIs impose.
Asynchronous JS-to-C++ Bindings
Internal pages communicate with the C++ backend through WebView2 PostWebMessage bindings rather than synchronous script injection. The controller registers handlers for updateConfig and getConfig messages, dispatching JSON reads and writes on a background thread before responding via ExecuteScript. This keeps the UI thread unblocked during config I/O.
Outcomes
Functional standalone browser binary under 5MB without bundling Chromium
Full qenba:// internal page system with persistent JSON config
Collapsible vertical tab UI with concurrent AI side panel operational on Windows
Performance Benchmarks
Native binary under 5MB without bundled runtime
Hardware-accelerated Slint UI chrome with no browser overhead
Async config I/O keeping UI thread unblocked