spyder-ide / qtawesome

Iconic fonts in PyQt and PySide applications
https://qtawesome.readthedocs.io/en/latest/index.html
MIT License
802 stars 106 forks source link

PySide6 support #161

Closed WhyNotHugo closed 3 years ago

WhyNotHugo commented 3 years ago

Trying to use this fails with:

Traceback (most recent call last):
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/qtpy/__init__.py", line 204, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/shiboken6/files.dir/shibokensupport/__feature__.py", line 140, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hugo/workspace/Hugo/screenman/test.py", line 130, in <module>
    widget = MainWindow()
  File "/home/hugo/workspace/Hugo/screenman/test.py", line 80, in __init__
    name = "/home/hugo/screenshots/2020-12-12T00:28:26,928755128+01:00.png"
  File "/home/hugo/workspace/Hugo/screenman/test.py", line 58, in __init__
    self.addAction(SaveAction(self))
  File "/home/hugo/workspace/Hugo/screenman/test.py", line 31, in __init__
    import qtawesome as qta
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/shiboken6/files.dir/shibokensupport/__feature__.py", line 140, in _import
    return original_import(name, *args, **kwargs)
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/qtawesome/__init__.py", line 20, in <module>
    from qtpy import QtCore, QtWidgets, QtGui
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/shiboken6/files.dir/shibokensupport/__feature__.py", line 140, in _import
    return original_import(name, *args, **kwargs)
  File "/home/hugo/.cache/pypoetry/virtualenvs/screenman-YK8rCbov-py3.9/lib/python3.9/site-packages/qtpy/__init__.py", line 210, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

The latest release of PySide is packaged as PySide6, so this fails. Any change of adding support for it?

stonebig commented 3 years ago

you mean Pyside2-6 ? you may rather use "pyside2", and nevertheless, Spyder team doesn't expect to support Pyside2-5 before Spyder-5... somewhere in 2021. In the mean time, you'll have the more basic Pyzo that may work.

ccordoba12 commented 3 years ago

@WhyNotHugo, this depends on support for PySide6 in QtPy. Fortunately, someone is already giving us a hand with that in spyder-ide/qtpy#225, so I expect to release a new version in two or three weeks.

WhyNotHugo commented 3 years ago

@stonebig Pyzo seems to be something entirely different to qtawesome.

@ccordoba12 Interesting! I wasn't aware that qtpy was also a spyder project! You guys are doing lots of great stuff!

I'll follow that PR to keep in the loop, thanks!

WhyNotHugo commented 3 years ago

Closing in favour of https://github.com/spyder-ide/qtpy/pull/225/.

ccordoba12 commented 3 years ago

@ccordoba12 Interesting! I wasn't aware that qtpy was also a spyder project! You guys are doing lots of great stuff!

Thanks for your kind words!

Closing in favour of spyder-ide/qtpy#225.

And thanks for your patience too.