[PyQt] pyuic4 vs uic Module

michael h michaelkenth at gmail.com
Sun Aug 5 21:29:56 BST 2018

> Is there any best practice suggestion as to how to interact with the Qt ui
> files? Is it better to load them dynamically using the uic module with the
> load uic.loadUi method?
> Or is it recommended to compile the ui files into python code using pyuic4?

I've done it both ways but compiling them beforehand should have better
performance and when bundling using py2exe/cxfreeze/pyinstaller there's no
extra work to do since they are normal .py source files (and your .ui files
won't be in the dist).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180805/3a43a602/attachment.html>

More information about the PyQt mailing list