You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,27 @@ Using the OS path separator (`os.pathsep`) which is `:` on Unix systems and `;`
135
135
136
136
<br>
137
137
138
-
##### Load Qt Designer .ui files
138
+
##### Compile Qt Designer files
139
+
140
+
> WARNING - ALPHA FUNCTIONALITY<br>
141
+
> See [#132](https://github.com/mottosso/Qt.py/pull/132) for details.
142
+
143
+
`.ui` files compiled via `pyside2-uic` inherently contain traces of PySide2 - e.g. the line `from PySide2 import QtGui`.
144
+
145
+
In order to use these with Qt.py, or any other binding, one must first erase such traces and replace them with cross-compatible code.
146
+
147
+
```bash
148
+
$ pyside2-uic my_ui.ui -o my_ui.py
149
+
$ python -m Qt --convert my_ui.py
150
+
# Creating "my_ui_backup.py"..
151
+
# Successfully converted "my_ui.py"
152
+
```
153
+
154
+
Now you may use the file as you normally would, with Qt.py
155
+
156
+
<br>
157
+
158
+
##### Load Qt Designer files
139
159
140
160
The `uic.loadUi` function of PyQt4 and PyQt5 as well as the `QtUiTools.QUiLoader().load` function of PySide/PySide2 are mapped to a convenience function `load_ui`.
0 commit comments