question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Advice on compiling .ui files/Improve support for .ui files

See original GitHub issue

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 .uifiles with the commands provided by PySide2, then change the .pyincludes to use qtpy 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 .uifiles to .py that are fully compatible with qtpy.

Is there some advise on how to handle this?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
zkovaricommented, Oct 11, 2022

Hi @dalthviz, yeah, I could take a look.

Btw, I don’t think this properly supports PySide2 either. It seems to me that pyside2uic.compileUi was only available until 5.13.2. Someone mentioned in the linked issue that pytside2-uic was brought back in 5.14.2.2, and I assume that’s true (I don’t know PySide that much). The latest PySide version indeed has the pytside2-uic CLI, but it doesn’t have the compileUi API.

So I wonder if there are multiple issues, as qtpy uic.compileUi behaves differently per each version:

  • PySide2 < 5.14: works fine
  • PySide2 >= 5.14: doesn’t work because the module is missing (although pytside2-uic is available, perhaps only from 5.14.2.2 - to be checked)
  • PySide6: no attempt to support atm, so it doesn’t work

But I could take a deeper look later.

1reaction
dalthvizcommented, Jun 24, 2022

Just in case, maybe this could be interesting: https://github.com/hmaarrfk/qtpy-tools/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compile Qt UI file?
Try to create new Visual Studio project, and then choose "Qt Application" or similar - don't choose MFC application, etc... For this you...
Read more >
Please help, I'm trying to open a .ui file and I accidentally ...
Please help, I'm trying to open a .ui file and I accidentally made notepad the default way for it to open and now...
Read more >
Build a UI with Layout Editor - Android Studio
The Layout Editor enables you to quickly build layouts by dragging UI elements into a visual design editor instead of writing layout XML...
Read more >
Using a Designer UI File in Your C++ Application
Qt Designer UI files represent the widget tree of the form in XML format. The forms can be processed: At compile time, which...
Read more >
How to Import a PyQt5 .ui File in a Python GUI
In this tutorial, I explain how to import .ui files created using ... install so I would recommend reading the other post to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found