Issue
I am little confused by using the .ui file and .py file. I created a simple application using the pyqt designer and I used
UI_File, _ = loadUiType(path.join(path.dirname(__file__), 'dct-pages.ui'))
but I read other topic where we have to convert the ui file to py and import the py file into our codes, however my code is very simple and working without doing that
my question is do I need first to create the ui file and then generate the py file out of it then code what will be the situation if I wanted to change something in the UI, do I need everytime to regenerate the py file and import it
appreciate any pointers
Solution
You can either use the .ui file dynamically like you are already doing, or alternatively convert it to Python code using the pyuic5 utility (and yes, you have to regenerate the Python file every time use change the ui file in that case which is why I prefer to directly load the ui file as you have already done).
See the documentation for more details.
Answered By - three_pineapples
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.