打造 UI-1

以 pyside6 擴展 QLabel 呈現Image

要進行圖像標示時, 用戶需要清晰看到該圖, 決定採 QLable 來呈現該圖像. 所以我們擴充 QLabel, 其中最需要的就是每次用戶完成標示後, 要更新成新的圖像, 所以製作一個方法 refreshImg, 是從 WorkFolder 物件裡取 currentImg

WorkFolder 裡原先並無 getCurrentImg 此方法, 我們改寫WorkFolder 增加 getCurrentImg(), 同時為了讓 self.current 為 private, 我們依照Python命名改為 self._current.