Skip to content
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

Python bindings for PySide (Licensing issues with PyQt - GPL3) #298

Closed
AHSauge opened this issue Jan 16, 2021 · 19 comments
Closed

Python bindings for PySide (Licensing issues with PyQt - GPL3) #298

AHSauge opened this issue Jan 16, 2021 · 19 comments

Comments

@AHSauge
Copy link

AHSauge commented Jan 16, 2021

This looked very promising to me until I realised that the Python bindings uses PyQt. PyQt is a library that is available under a dual GPL and commercial license. As my intended usage would be non-compliant with GPL (but compliant with LGPL), in it's current form I would need a commercial license for PyQt. This of course also applies to any other user, including users believing this library is compatible with LGPL in it's entirety. I'm not an expert on this, but the way I see it, the Python sections of this project is unfortunately not compatible with LGPL.

To avoid the above mentioned issues, I would suggest to replace PyQt with PySide as that is actually licensed as LGPL itself.

@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented Jan 17, 2021

I have not implemented the Python bindings - this was a contribution from other ADS users. If you would like to replace these bindings with Pyside bindings, then feel free to create a pull request.

On the main project github page you will find the contact details of the current Python bindings authors. So you should talk to them before you create your bindings for PySide

@githubuser0xFFFF githubuser0xFFFF changed the title Licensing issues with PyQt Python bindings for PySide (Licensing issues with PyQt Jan 17, 2021
@githubuser0xFFFF githubuser0xFFFF changed the title Python bindings for PySide (Licensing issues with PyQt Python bindings for PySide (Licensing issues with PyQt) Jan 17, 2021
@githubuser0xFFFF githubuser0xFFFF changed the title Python bindings for PySide (Licensing issues with PyQt) Python bindings for PySide (Licensing issues with PyQt - GPL3) Jan 17, 2021
@AHSauge
Copy link
Author

AHSauge commented Jan 21, 2021

I have not implemented the Python bindings - this was a contribution from other ADS users. If you would like to replace these bindings with Pyside bindings, then feel free to create a pull request.

On the main project github page you will find the contact details of the current Python bindings authors. So you should talk to them before you create your bindings for PySide

Understood. I might want to dive into this, but for the moment, this was only for technology research for a future project. I can raise the issue with the contributes of the Python bindings to get a better understanding behind the rational of using PyQt.

@n-elie
Copy link

n-elie commented Jan 28, 2021

Hello,

I originally wrote the Python binding and i am currently maintaining it. The main reason I chose PyQt over PySide is that I wanted to use Qt-Advanced-Docking-System in application I develop and that was using another lib from it's PyQt bindings.
I have no idea how to write a binding for PySide (except that it use Shiboken instead of SIP).
However I am also interested in porting Qt-Advanced-Docking-System to PySide, so if you can point me to an example lib with PySide bindings, that would really help.

@jntille
Copy link

jntille commented Mar 30, 2021

I just wanted to express my interest in PySide2 bindings, as nearly all industry tools have migrated to PySide for the licensing reasons addressed above. Unfortunately, I currently lack the skills to contribute to the port.
If I come across some libs, I'll add them here. Maybe this is a good start: https://blog.basyskom.com/2019/using-shiboken2-to-create-python-bindings-for-a-qt-library/

@DKStudio
Copy link

DKStudio commented Jul 1, 2021

qtpydocking

@AHSauge
Copy link
Author

AHSauge commented Aug 7, 2021

qtpydocking

That is deprecated in favour of the current Python integration here. Ignoring the fact that qtpy doesn't support Qt6 yet, I do like the idea of using that. Since I have a bit of time left over these days, I'll take a quick dive into this. The link @jntille provided seems like quite a useful starting point.

@michiel007
Copy link

I am also interested in porting Qt-Advanced-Docking-System to PySide, but have no experience into this matter.
Some more information/example to pyside bindings:

@AHSauge
Copy link
Author

AHSauge commented Oct 13, 2021

I am also interested in porting Qt-Advanced-Docking-System to PySide, but have no experience into this matter. Some more information/example to pyside bindings:

* Utilizing Shiboken to Enhance your Qt for Python Application -> https://youtu.be/mAfEVPgHRt8 (mentioned on https://www.qt.io/qt-for-python)

* https://github.com/qt-ps-americas/pysideqwt

* https://github.com/sewoods/shiboken_simplegraph_example

I did actually get some progress on this in August. It was building and shiboken wasn't complaining any more, but I never got around to actually test it so I don't know if what I did was actually correct. I'll see if I can push it up later today at least. It's a starting point at least if someone else wants to make stab at it.

@AHSauge
Copy link
Author

AHSauge commented Oct 14, 2021

It probably needs a clean-up, but I've pushed up my untested attempt to https://github.com/AHSauge/Qt-Advanced-Docking-System/tree/pyside2

@herronelou
Copy link

Great to hear you're working on this, had been looking at this library and was about to give up on it because of the lack of PySide2 bindings. Good timing.

@n-elie
Copy link

n-elie commented Mar 2, 2022

Hello,

I worked on this based on AHSauge attempt and finally got something usable. At least all examples work well.
https://github.com/metgem/PySide2Ads

I also created conda-forge recipes: https://github.com/metgem/staged-recipes/tree/qtads/recipes

This is a work in progress. Tested only on Windows for now

@n-elie
Copy link

n-elie commented Mar 2, 2022

Updated examples to work with these bindings: https://github.com/n-elie/Qt-Advanced-Docking-System/tree/pyside2ads/examples

@cniemira
Copy link

cniemira commented Jun 22, 2022

FWIW - I have a working proof-of-concept for Pyside6 built with shiboken here:
~~ https://github.com/cniemira/Qt-Advanced-Docking-System/tree/shiboken ~~
edit: https://github.com/cniemira/pyside6_qtads

@saulthu
Copy link

saulthu commented Oct 30, 2022

I'd love for this work to progress. I normally use pyside (LGPL yay!), but have been using PyQt5 just for this docking system -- PyQt5 has a tendency to hard crash if you do anything a bit off, while pyside tends to just give a soft Python stack trace. Would much prefer to have pyside + qtads 😄

@n-elie
Copy link

n-elie commented Oct 30, 2022

Hello,
I'm trying to have my bindings for pyside2 accepted in conda forge but it not compiling without adding clangdzv dependency: conda-forge/staged-recipes#19017
The bindings are here: https://github.com/metgem/PySide2Ads
If someone have an idea on how I can get this recipe accepted, any help would be appreciated

@mborgerson
Copy link

mborgerson commented Oct 31, 2022

Hello PySide6 users,

I've also wanted to use this great docking system in a PySide6-based application. To that end, I've managed to build usable PySide6 bindings at https://github.com/mborgerson/pyside6_qtads, which is based on a combination of @cniemira, @n-elie / @AHSauge's work (thank you!).

I've published wheels on PyPI that are built against latest PySide6 and can be installed on Windows, macOS, and Linux with:

pip install PySide6-QtAds

Sample code is available here https://github.com/mborgerson/Qt-Advanced-Docking-System/tree/pyside6/examples. To run the samples, you'll also need to install latest qtpy from source (pip install https://github.com/spyder-ide/qtpy/archive/refs/heads/master.zip).

Ultimately I'd like to see our efforts for PySide bindings unified, possibly merged into this upstream repository properly to keep Python support current, and I'm happy to work with others to make that happen. In the mean time, I'll manage this independent package.

@githubuser0xFFFF
Copy link
Owner

@mborgerson Thank you for providing PySide6 bindings - that are great news. I updated the Python section in the README.md file with your PySide6 bindings and linked to this issue. If you would like to see additonal information about the Python bindings in the README.md, feel free to create a pull request.

@tu-cao
Copy link

tu-cao commented Mar 3, 2023

Hi @mborgerson

Why I got:
AttributeError: Error evaluating PySide6QtAds.ads.CDockManager.init: module 'PySide6QtAds' has no attribute 'ads'

on every examples

@divintzero
Copy link

Hi @mborgerson

Like @tu-cao I also get:AttributeError: Error evaluating PySide6QtAds.ads.CDockManager.init: module 'PySide6QtAds' has no attribute 'ads'

when importing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests