ENH: support for `PySide6` in `%gui` (#13864)...
ENH: support for `PySide6` in `%gui` (#13864)
Addresses
#13859
Changes here parallel the changes in
[ipykernel](
https://github.com/ipython/ipykernel/pull/1054), i.e. prefer
`PyQt` over `PySide` and allow requesting explicit versions (e.g. 'qt5')
with one difference (see below).
I believe that, eventually, the Qt importing logic should be all here,
and `ipykernel` should defer to`ipython`. I chose not to do that at this
time since it would mean the latest `ipykernel` would require the latest
`IPython`; I'm happy to discuss further.
The only difference between `IPython` and `ipykernel`, after these two
pull requests, is that, in `IPython`, it's not possible to explicitly
request an event loop for Qt4. This is because an alias exists
[here](
https://github.com/ipython/ipython/blob/5409de68d87ddd073a35111aca0cb8360ff63ca8/IPython/terminal/pt_inputhooks/__init__.py#L5)
which effectively makes "qt4" be "the latest Qt available". I did not
remove the alias because I don't know the history behind it.