-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advice on compiling .ui files/Improve support for .ui files #339
Comments
Hi @SanPen, quite nice project! About your question, well that's kind of tricky, I haven't used .ui files to be honest and I think there is no way at the moment to parse the .ui files into a qtpy supported version, sorry :/ (Maybe @ccordoba12 knows better). Also, are you trying to drop generating the GUI by using .ui files and trying to move the last generated files to use qtpy then? If that is the case maybe we could try to help you checking the errors that you are seeing when running with PySide6 (maybe some of them are caused due to missing things on the qtpy side (missing imports that are not being exposed here yet or namespace errors due to a name difference between qtpy and PySide6, etc). Just in case, on Anyhow If there is something we can help or you see that we can add in qtpy fix things appearing in your migration process let us know! Edit: Checking we have some issues regarding the uic methods like #104 putting a reference here to that just in case |
Just in case, maybe this could be interesting: https://github.com/hmaarrfk/qtpy-tools/ |
I also use a lot of I've recently added a little library that compiles multiple UI files recursively and generates code compatible with pyqt5/6 or pyside2/6 - depending on what you have on the path. It's only me using it atm, so obviously it needs some work, doc, and better tests. But it's actually pretty simple: https://github.com/plotlyst/qt-uic/blob/main/qtuic/__init__.py
...so then it picks up every UI file from the It is partially based on So how could Oh, btw, this approach probably works best if you store all the UI files in one location. I do that in my GUI: https://github.com/plotlyst/plotlyst-app/tree/main/ui. Then all the compiled |
Hi @zkovari thank you for sharing the work you have been doing to manage ui files! I believe that we have some level of However, seems like the missing thing on If you want, I think you can open a PR adding those lines to Lines 81 to 102 in 936e0c9
What do you think? Let us know if doing the PR sounds good to you! |
Hi @dalthviz, yeah, I could take a look. Btw, I don't think this properly supports PySide2 either. It seems to me that So I wonder if there are multiple issues, as qtpy
But I could take a deeper look later. |
Thanks for the new info @zkovari ! And then this could be quite more involved than I though 🤔 Just in case, I would say the final goal will be to offer Any new info or help with this is greatly appreciated and if you need any help let us know :) |
Hi,
I'm the author of this project that uses PySide2.
I would like to migrate completely to
qtpy
but I'm facing some issues when compiling the.ui
files.I've noticed that If I compile the
.ui
files with the commands provided by PySide2, then change the.py
includes to useqtpy
and then run the project with PySide6, some elements do not transfer well.I think that the main issue is that I do not have a cross-qt compiler of the
.ui
files to.py
that are fully compatible withqtpy
.Is there some advise on how to handle this?
The text was updated successfully, but these errors were encountered: