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

[Feature] Use qtpy, don't require specific backend? #7

Open
tlambert03 opened this issue Jan 21, 2021 · 2 comments
Open

[Feature] Use qtpy, don't require specific backend? #7

tlambert03 opened this issue Jan 21, 2021 · 2 comments

Comments

@tlambert03
Copy link

howdie, this project looks awesome! was just looking around for updates in this sphere and it looks like you're actively working on this in the last couple minutes even 😄

I'm wondering if you could possibly be persuaded to use qtpy instead of directly importing from PyQt5, and to remove pyqt5 from your install_requires? I'm a core developer at napari and the author of magicgui, and would potentially want to use your package in those projects, but we want to support people using pyside as well.

thanks for making this available!

@introkun
Copy link
Owner

@tlambert03 thanks for the idea. Will take a look into it.

@tlambert03
Copy link
Author

thanks! I'll mention right up front, the downside is that pip install qt-range-slider won't work on it it's own, but qtpy will give an interpretable "missing backend" error, and you can provide an extras_require field in your setup.py for both pyqt5 and pyside2 and encourage your users to install with pip install qt-range-slider[pyqt5] or pip install qt-range-slider[pyside2]. Here is an example of how I've done that elsewhere (just using setup.cfg instead of setup.py)

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

No branches or pull requests

2 participants