Skip to content

Add PyQt6 multi-file GUI for MarkItDown - #2325

Open
Rahul Pawar (rahulpwar654) wants to merge 3 commits into
microsoft:mainfrom
rahulpwar654:rahulpwar/markitdown-gui
Open

Add PyQt6 multi-file GUI for MarkItDown#2325
Rahul Pawar (rahulpwar654) wants to merge 3 commits into
microsoft:mainfrom
rahulpwar654:rahulpwar/markitdown-gui

Conversation

@rahulpwar654

Copy link
Copy Markdown

markitdown-gui desktop app implementation

@rahulpwar654

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@R-zin Razin M (R-zin) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for source_file in self._selected_files:
result = converter.convert(str(source_file))
If you use this then when a large PDF or any file is queued for conversion it uses the same thread for the Qt GUI as well (The GUI can freeze) so I think you should spawn a Worker Thread which will handle MarkItDown.convert() function which will be on separate thread and when it finishes it can update the Qt thread. You can even add a progress bar in GUI also.

@R-zin Razin M (R-zin) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for source_file in self._selected_files:
result = converter.convert(str(source_file))
If you use this then when a large PDF or any file is queued for conversion it uses the same thread for the Qt GUI as well (The GUI can freeze) so I think you should spawn a Worker Thread which will handle MarkItDown.convert() function which will be on separate thread and when it finishes it can update the Qt thread. You can even add a progress bar in GUI also.

@rahulpwar654

Copy link
Copy Markdown
Author

Changes in _qt_gui.py:

MarkItDown.convert() now runs inside a QObject worker moved to a QThread.
Added a determinate progress bar showing completed files.
Worker emits signals for:
Progress updates
Log messages
Final success/failure counts
All Qt widget updates remain on the main GUI thread.
File selection and conversion controls are disabled while work is running.
Worker and thread objects use deleteLater() cleanup.
Output collision handling was moved into the worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants