[Eric] Help with automatic placement of compiled resource file / automated import statement
Detlev Offenbach
detlev at die-offenbachs.de
Sun Nov 18 14:58:55 GMT 2018
Hello,
the requested function is not available yet. I will add an option to the
project forms browser, that allows to configure the "--import-from=" option of
the pyuic5 forms compiler. This will then generate import statements like
"from resources import icon_rc". I hope this is what you were looking for. The
plan is to have this included in the 18.12 release.
Detlev
Am Sonntag, 18. November 2018, 13:54:45 CET schrieb Orestes Mas:
> Hello,
>
> I'm having a little problem with Eric's automatic form/resource
> compiler. Let's say I've the following directory structure:
>
> Project's top directory
> \___ (file) main.py
>
> \___ (dir) resources
>
> | |
> | \___ (files) various image/icon files
> | \___ (file) resource.qrc
> | \___ (file) resource_rc.py (compiled resource file, Eric-generated)
>
> \___ (dir) ui
> \___ (file) mainwindow.ui
> \___ (file) configdialog.ui
> \___ (file) Ui_mainwindow.py (compiled, Eric-generated)
> \___ (file) Ui_configdialog.py (compiled, Eric-generated)
>
>
> The problem is that in the "Ui_*" files that Eric generates
> automatically he inserts a
> "import resources_rc" line which fails at runtime because "resources_rc"
> isn't located at "ui" directory.
>
> The correct line should be "import resources.resources_rc" or "from
> resources import resources_rc". Alternatively, he should generate the
> compiled resource file at the top directory, where "main.py" resides.
> Meanwhile, I'm copying manually the "resources_rc.py" file to the top
> directory every time I change the resources.
>
> Unfortunately, I've not found how to indicate Eric neither of these two
> solutions. Perhaps is easy, but I'm new to Eric and I'm still learning.
>
> Any help will be appreciated.
>
> Orestes.
>
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/eric
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list