Repository navigation
v0.6.0rc2
Pre-release
⚠️ Release Candidate — API may still change before the final v0.6.0.
⚠️ 候选版本 — API 在正式 v0.6.0 发布前仍可能调整。
🏗️ Architecture / 架构变更
WebView 嵌入方式从直接子窗口改为独立锚点窗口 + fromWinId + createWindowContainer。
The WebView is now hosted inside an independent anchor QWindow (floating, frameless, tool window) rather than as a direct native child of the Qt widget. The anchor is wrapped via QWindow.fromWinId() + createWindowContainer(), so Qt manages geometry automatically — no manual set_bounds, no resizeEvent syncing.
核心收益 / Key benefit:
-
锚点窗口独立于 Qt widget 树 —— 父窗口 close/show 不会销毁 WebView。托盘应用不再需要担心 WebView 消失。
The anchor window is independent of the Qt widget tree — parent window close/show cycles don't kill the WebView. Tray apps just work. -
wry
build()自动管理大小 ——as_child=False让 wry 通过 WM_SIZE 子类化自动填满锚点,无需手动调用set_bounds。
as_child=Falselets wry'sbuild()auto-fill the anchor via WM_SIZE subclassing — no manualset_bounds.
✨ New / 新增
native_child: bool = False— 设为True恢复旧行为(WebView 作为 widget 的直接原生子窗口)。默认False使用新锚点方案。
Set toTrueto restore the old behaviour (WebView as a direct native child of the widget). DefaultFalseuses the new anchor scheme.
🗑️ Removed / 移除
- 不再需要
WA_NativeWindow(默认路径下)。锚点窗口自己管理原生句柄。
WA_NativeWindowno longer needed in the default path. The anchor window manages its own native handle.
📝 Docs / 文档
- README 新增 System Tray / Hide & Show 章节(中英双语),说明
closeEvent中应使用event.ignore()+hide()而非默认close()。
Added System Tray / Hide & Show section (EN & ZH) explainingevent.ignore()+hide()instead ofclose()in tray apps.
📦 Dependencies / 依赖
- wryview
~=0.2.0→~=0.3.0
Full Changelog: v0.6.0rc1...v0.6.0rc2