When I use this command on windows:
python -m PyQt4.uic.pyuic user_interface.ui -o user_interface.py
After that, I add a resource:
pyrcc4.exe -py3 images.qrc -o images.py
And I end up with two beautiful files, user_interface.py, and images.py. The problem is that the user_interface.py file ends with this line of code:
... all QT stuff here.
import images_re
And because this is a module that is called from many parents, it has to be imported like this:
import myapp.gui.images_re
When I change the line of code it works perfectly, but every time I modify the user_interface.ui file and then execute the batch, it will be overwritten, and I will have to change it manually every time.
Is there any way to tell pyuic what to write in that import statement?
Or any batch code that can be executed after the pyuic and changes that line of code?
Or some tweak on the .py file that calls user_interface.py for example to change the default directory so it imports images_re from there?
--from-imports
. – Gowanpyuic.bat file.ui --from-imports "myapp.gui" --output file.py
and it sayserror: one input file must be specified.
– Burglarize