Skip to content

umitkrkmz/ui2py-pyside6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI2Py – PySide6 Edition

PySide6 Python License: MIT

A simple yet powerful GUI tool to convert one or multiple Qt Designer .ui files into Python code using PySide6.

Main Window - Empty

✨ Features

  • 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.

⚡ Quick Setup

This project depends only on PySide6.

  1. Create and activate a virtual environment:

    # Create
    python -m venv .venv
    # Activate (Windows)
    .venv\Scripts\activate
    # Activate (macOS/Linux)
    source .venv/bin/activate
  2. Install the dependency:

    pip install PySide6
  3. Run the app:

    python ui2py.py

▶️ Usage

  1. Select File(s) — Click Select File or drag & drop one or more .ui files into the window.
  2. (Optional) Select a destination folder. By default, it's the same folder as the input file(s).
  3. (Optional, single file only) Edit the output name.
  4. Click Convert. Status updates will appear at the bottom.

💡 Tip: When converting multiple files, each one is automatically named as ui_<filename>.py.

🖼 Screenshots

After file selection (Prefix/Base/Suffix visible)

File Selected

Drag & drop success status message

Drag & Drop Success

Editing the output name (focus underline)

Editing Output Name

Conversion completed message

Conversion Completed

After conversion (file created in selected folder)

After Conversion - File in Folder

After dropping multiple files

Multi File Drop

After conversion multiple files (file created in selected folder)

After Conversion - File in Folder

📝 Changelog

  • 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.

🆘 Troubleshooting

  • pyside6-uic not found on PATH Make sure PySide6 tools are installed and your terminal can run pyside6-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.

📄 License

MIT © 2025 umitkrkmz

About

Convert Qt Designer .ui files to Python code using PySide6 – with a simple one-click GUI.

Topics

Resources

License

Stars

Watchers

Forks

Languages