-
Notifications
You must be signed in to change notification settings - Fork 256
fix a bug of load_ui function for pyside #150
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
Conversation
|
And also take a gander at the error message, looks like something went out the window with PySide2 for both Python 2 and 3. See the developer guide for how you could run tests locally, of keep committing to your repository to test here. |
|
Hi @sol87 and thanks for this! Regarding adding custom widgets support, I did implement that into You can view the full However, this was not merged. We came to the conclusion that this would add functionality to Qt.py which wasn't maintained by PySide/PyQt/Qt but instead had to be maintained by us. For end-users this would mean relying on features which were actually not developed in co-operation with neither the PySide development team or the PyQt development team. And the same goes for adding the "base_instance" argument, which I personally needed at the time. We actually defined some of our guidelines based on that discussion:
This should've been added to the development guidelines, which @mottosso already mentioned, but now when I glance through it, I can't see it being mentioned so we should probably fix that. Okay... back to my story. Since I personally set out to add a base instance argument to load_ui, I decided it would be useful to at least add examples of how load_ui could be extended to support this (although not making load_ui) support it out of the box, and therefore steering users in a more compatible direction in terms of development. These examples are part of Qt.py testing and reside here: https://github.com/mottosso/Qt.py/tree/master/examples/load_ui I propose that instead of adding custom widgets support to Qt.py directly we add one another example, where it is shown how such functionality can be added to load_ui. In the end, this would just mean that for the majority of users, load_ui is a simple function doing simple remapping - and for those who need more complex functionality, examples are provided on how to extend load_ui. Please let me know what you think. |
|
Sure. I will make a example file soon. |
|
Hi @fredrikaverpil . I have checked your hack. It seems cool. I believe you make this decision based on good reasons :) |
|
Well put, @fredrikaverpil, and thanks for understanding @sol87! |
If there are custom widgets in ui files, we must register them before loader.load() in pyside. So I make a new function for that.