Skip to content

TODO – Future Migration to PySide6 #22

Description

@TobiaRigon

Objective

Evaluate and plan the migration from tkinter to PySide6 (Qt for Python) to enhance UI flexibility, scalability, and visual consistency across platforms.

Reasons for Migration

  • Modern and professional UI components with native look and feel.
  • Better support for complex widgets (e.g., collapsible trees, tabs, docking panels).
  • Improved layout management and styling via Qt Designer or QSS.
  • Asynchronous operations and threading better integrated with the event loop.

Migration Plan (Phased)

Phase 1 – Feasibility & Setup

  • Set up a minimal prototype using PySide6 for the main window.
  • Identify dependencies currently tied to tkinter (dialogs, previews, widgets).
  • Decide if Qt Designer will be part of the workflow.

Phase 2 – Core UI Porting

  • Migrate main window layout and logic to PySide6.
  • Replace message boxes, file dialogs, and input dialogs with Qt equivalents.
  • Rebuild TreeView with QTreeView + QFileSystemModel and custom checkboxes.

Phase 3 – Feature Parity

  • Re-implement file preview panel with live update.
  • Port settings dialog with token presets and scrollable layout.
  • Ensure theme support (light/dark) using QPalette or QSS.

Phase 4 – Testing and Optimization

  • Test performance with large projects.
  • Validate token counting and live preview responsiveness.
  • Ensure backward compatibility of settings and CLI tools.

Phase 5 – Optional Enhancements

  • Add dockable panels for preview and progress.
  • Support high-DPI scaling and retina displays.
  • Integrate markdown rendering directly in the GUI using Qt WebEngine or QTextBrowser.

Considerations

  • PySide6 increases app size and complexity but unlocks professional UI capabilities.
  • Cross-platform packaging (e.g. using PyInstaller) must be re-evaluated for Qt dependencies.
  • GUI testing becomes easier with tools like pytest-qt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions