0.5.0
Alpha release of --convert
for Qt Designer files.
Steps
- Have your .ui file ready.
- Compile your .ui file using the PySide2
uic
module. - Convert your compiled .ui file with Qt.py
Demo
$ pyside2-uic my_ui.ui -o my_ui.py
$ python -m Qt --convert my_ui.py
# Creating "my_ui_backup.py"..
# Successfully converted "my_ui.py"
Note to Maya 2017-users: You can find pyside2-uic in your Maya installation directory
Implementation
The method at which the conversion happens is early alpha and is expected to work in common cases, but may not cover all edge cases.
What we need is for you to test this, and let us know where it fails so we can repair it.
The implementation will, at this point in time:
- Replace occurrences of
from PySide2 import
withfrom Qt import
- Replace occurrences of
QtWidgets.QApplication.translate
withQt.translate
And that's it.
The function is idempotent and will create a backup of your original, as my_ui_backup.py
Let us know what you think!