feat(bec_queue): add QWidget view with the same UX for comparison with QML

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F2iSCsSSznEdY4HxoVaqoi
This commit is contained in:
Claude committed 2026-10-09 20:13:54 +00:00
1 parent 840773e4ba
commit 018e5051b7
3 files changed
+818 -3

No files matched your search

@@ -66,7 +66,7 @@ class BECQueue(BECWidget, CompactPopupWidget):
self.controller.clear_requested.connect(self.clear_queue)
self._history_ready.connect(self.controller.set_history)
self.view = create_quick_widget(self, QML_FILE, {"queue": self.controller})
self.view = self._create_view()
self.view.setMinimumSize(320, 160)
self.addWidget(self.view)
self.label = "BEC Queue"
@@ -77,6 +77,14 @@ class BECQueue(BECWidget, CompactPopupWidget):
if refresh_upon_start:
self.refresh_queue()
def _create_view(self) -> QWidget:
"""Create the widget that renders the queue: here the QML view."""
return create_quick_widget(self, QML_FILE, {"queue": self.controller})
def _release_view(self):
"""Unload the QML tree before the controller it binds to is deleted."""
self.view.setSource(QUrl())
@Property(bool)
def hide_toolbar(self):
"""Property to hide the BEC Queue toolbar."""
@@ -223,10 +231,10 @@ class BECQueue(BECWidget, CompactPopupWidget):
self.queue.request_queue_reset()
def cleanup(self):
"""Release the QML view before the controller it binds to."""
"""Wait for a pending history read and release the view."""
if self._history_thread is not None:
self._history_thread.join(timeout=1)
self.view.setSource(QUrl())
self._release_view()
super().cleanup()