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

make pyqt optional #71

Open
GlennWSo opened this issue Feb 3, 2023 · 2 comments
Open

make pyqt optional #71

GlennWSo opened this issue Feb 3, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@GlennWSo
Copy link
Contributor

GlennWSo commented Feb 3, 2023

Discussion in #69 reveled that having pyqt as a optional dependency would be valuable for some users

I confirm: madcad cannot at the moment be imported without pyqt installed. However It wouldn't ask too much work to acheive.

* the rendering pipeline itself only depends on openGL, and really needs it working only when instantiated

* the `View` widget has a base class `ViewCommon` that does not depend on Qt either

I think it could be a nice addition to make pyqt an optional dependency, since most of the madcad features are just computational. But that's something we cannot just hack at the moment since it raises many question we have to answer first before refactoring the module.

* how to choose which rendering backend (if any) is used when madcad is imported ?

* should we move to PySide6 (Qt6) ?

* should we support both PySide2 and PySide6 (Qt5 and Qt6) ?

* `show()` shall stay in the root module (for convenience), so what is the best way to make it initialize the Qt backend if it is not already initialized ?

* what _practices_ should we enforce in madcad to let the madcad objects declare their own `.display()` method and classes without importing Qt

This case has to be started someday I think. If we are about to do it, we should open a new issue ;) Thanks @GlennWSo for having answered that topic while I was busy !

@jimy-byerley jimy-byerley added the enhancement New feature or request label Feb 3, 2023
@jimy-byerley
Copy link
Owner

This feature is added in the plan to improve the rendering pipeline

@jimy-byerley
Copy link
Owner

@bourbonut is working on a refactoring of the rendering pipeline that could address this feature, It will follow the architecture discussed on this repo

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

No branches or pull requests

2 participants