-
Notifications
You must be signed in to change notification settings - Fork 215
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
Change Alignement Operator -- Make conversion QPixmap --> QIcon explicit -- Use lambda to connect() to functions behind a wrapper #356
Conversation
Hi @AndrewAmmerlaan, it is great to see that you want to contribute to the Syncplay project. Sorry to be the bearer of bad news, but I believe that adding PyQt support would not be in the interests of the Syncplay project at this time based on the principles set out at #315. Back in 2013 we decided to use PySide rather than PyQt because the license (LGPL rather than GPL) allowed us to integrate it with our existing Apache 2.0 code. Our experience of maintaining PySide support is that getting it right can be hard, especially given the number of operating systems which Syncplay supports and the fact that at any time a new version can come out which breaks things in a way which might either cause Syncplay to not run or some minor glitch. Furthermore, supporting both PySide1 and PySide2 adds to the complexity of the code which we need to maintain. Licensing issues aside, expanding our official support beyond PySide to also support PyQt would further add to the complexity of the code and our maintenance burden. It would mean we were was supporting something which we wouldn't be using for our bundles and that the core Syncplay developers would not be using on a regular basis. As far as I know, there are no circumstances where a user could not use PySide or PySide 2. As such, I do not see us going beyond support for PySide in the future (although if the circumstances were right we might move to just PySide 2 to allow us to simplify the code and make it easier to maintain). |
Hi @Et0h I completely understand your reluctance to support yet another QtForPython implementation, especially if you do not use PyQt5 yourself.
The circumstance where this occurs is when a distribution has packaged either PyQt5 or PySide2 but not both (and the package maintainer (e.g. me) for the Qt Python application (e.g. Syncplay) does not want to go through the trouble of packaging the missing QtForPython implementation (e.g. PySide(2)), and would rather just port the application in question to the implementation that is present in the distribution (e.g. PyQt5)). In addition this makes it unnecessary for end-users to install both PySide2 and PyQt5 if they use multiple Qt Python applications. That being said, I do understand that you do not want to officially support another QtForPython implementation. However, I do think we can find the middle ground here. I have identified what exactly is different between PySide2 and PyQt5, and found three things which are relevant to the Syncplay code:
I have changed this PR to only include these changes I listed here, without referencing PyQt5. This way the code is compatible with PyQt5 but the application still only runs with PySide2. Thus, there still would be no need to officially support PyQt5. Would you please consider merging these changes as they are now? Nothing is changed in the functionality at all, all that is done is make some conversions that are done anyway explicit and change the alignment operator which doesn't change anything visually. And if you do ever change your mind about PyQt5, the code would already be compatible with it, and all that is need is this patch:
|
Pretty please? |
Hi,
I had to make the following changes to get this to run with PyQt5.
Mostly the changes are trivial:
IsPyQt5
and use it in if statements|
operator instead of&
in alignment, as I understand it this is not exactly the same, but PyQt5 complains about the&
operator, and the result is visually identical as far as I can tell. So I think it should be fine to change this.And then there were two issues I ran into that I sort of managed to create an ugly workaround for. There probably is a better solution than my ugly workaround, but I'll need your help and expertise to find it because I could not. You can find my workarounds on line 1397 in GuiConfiguration.py and line 456 in gui.py, along with a
To-Do:
comment.Please let me know what you think about this, it would be great to have both PyQt5 and PySide2 compatibility in my opinion.