A simple yet powerful GUI tool to convert one or multiple Qt Designer .ui
files into Python code using PySide6.
- Batch Conversion: Convert multiple
.ui
files to.py
files at once. - Drag & Drop Support: Simply drag your
.ui
files onto the application window. - Automatic Naming: Output files are intelligently named
ui_<filename>.py
. - Customizable Output: For single files, you can easily edit the output name.
- Dark/Light Theme: The application automatically adapts to your system's theme.
- Real-time Status Updates: Clear feedback during the conversion process.
- Cross-Platform: Works on Windows, macOS, and Linux.
This project depends only on PySide6
.
-
Create and activate a virtual environment:
# Create python -m venv .venv # Activate (Windows) .venv\Scripts\activate # Activate (macOS/Linux) source .venv/bin/activate
-
Install the dependency:
pip install PySide6
-
Run the app:
python ui2py.py
- Select File(s) — Click Select File or drag & drop one or more
.ui
files into the window. - (Optional) Select a destination folder. By default, it's the same folder as the input file(s).
- (Optional, single file only) Edit the output name.
- Click Convert. Status updates will appear at the bottom.
💡 Tip: When converting multiple files, each one is automatically named as
ui_<filename>.py
.
- v1.4.1: Added the ability to remove selected files from the multi-file list.
- v1.4: Added automatic dark/light theme support that adapts to the system in real time.
- v1.3: Introduced multi-file batch conversion and a dynamic UI that resizes to show a file list.
- v1.2: Implemented drag-and-drop support and a smarter, segmented output path editor.
- v1.1: Added better error handling and fixed taskbar visibility.
- v1.0: Initial release with basic single-file conversion.
-
pyside6-uic not found on PATH
Make sure PySide6 tools are installed and your terminal can runpyside6-uic
. -
No permission to write file Choose a folder where you have write permissions (e.g., your home or desktop folder).
-
Wrong file type Only
.ui
files are supported. -
Mixed file types dropped Only
.ui
files will be processed. Other file types will be ignored. -
Duplicate output names Output names are auto-generated as
ui_<filename>.py
. Ensure all input filenames are unique to avoid overwriting.