Skip to content

v0.6.0rc2

Pre-release
Pre-release

Choose a tag to compare

@xiaosuawa xiaosuawa released this 08 Jun 07:15
· 14 commits to master since this 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=False lets wry's build() auto-fill the anchor via WM_SIZE subclassing — no manual set_bounds.

✨ New / 新增

  • native_child: bool = False — 设为 True 恢复旧行为(WebView 作为 widget 的直接原生子窗口)。默认 False 使用新锚点方案。
    Set to True to restore the old behaviour (WebView as a direct native child of the widget). Default False uses the new anchor scheme.

🗑️ Removed / 移除

  • 不再需要 WA_NativeWindow(默认路径下)。锚点窗口自己管理原生句柄。
    WA_NativeWindow no 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) explaining event.ignore() + hide() instead of close() in tray apps.

📦 Dependencies / 依赖

  • wryview ~=0.2.0 → ~=0.3.0

Full Changelog: v0.6.0rc1...v0.6.0rc2