Milestone

This commit is contained in:
2025-02-16 22:50:39 -07:00
parent 6888b55612
commit 76cb82acd9
9 changed files with 144 additions and 11 deletions

View File

@ -31,7 +31,6 @@ def _ensure_qapplication():
"""
global app_instance
if QApplication.instance() is None:
print("Starting QApplication in a separate thread.")
app_instance = QApplication(sys.argv)
threading.Thread(target=app_instance.exec_, daemon=True).start()
@ -39,7 +38,6 @@ def create_ocr_region(region_id, x=250, y=50, w=DEFAULT_WIDTH, h=DEFAULT_HEIGHT)
"""
Creates an OCR region with a visible, resizable box on the screen.
"""
print(f"Creating OCR Region: {region_id} at ({x}, {y}, {w}, {h})")
_ensure_qapplication() # Ensure QApplication is running first
@ -88,7 +86,7 @@ def _update_ocr_loop():
regions[rid]['raw_text'] = raw_text
collector_mutex.unlock()
print(f"OCR Text for {rid}: {raw_text}")
# print(f"OCR Text for {rid}: {raw_text}") # SHOW RAW OCR OUTPUT IN TERMINAL FOR DEBUGGING
time.sleep(0.7)
@ -111,8 +109,6 @@ class OCRRegionWidget(QWidget):
self.selected_handle = None
self.region_id = region_id
print(f"OCR Region Widget Created at {x}, {y}, {w}, {h}")
self.show()
def paintEvent(self, event):