Comments (4)
I ran into issues when using classes that derive from multiple specific PyQt5
classes (I think in my case it was QGraphicsItem
and QObject
). Apparently, PyQt5
does generally not support this Python feature, I was told. Of course, one can create the same with single-inheritance, but it complicates the code and you might have noticed that a lot in ryvencore-qt depends on it. However, PySide2
has substantial issues as well :/ like the QGestureRecognizer
system being completely broken (since 7 years), so I cannot add sophisticated touch support.
from ryvencore-qt.
It will support PySide6
as well. PyQt5
has some fundamental inheritance restrictions, it basically breaks the Python language, and prevents features I need, so it probably will not be supported.
from ryvencore-qt.
Thank you for your reply. I'm curious about where PyQt differs from PySide in terms of feature implementation. Can you go into more details?
from ryvencore-qt.
Code I ran:
import sys
import os
os.environ['QT_API'] = 'pyside2' # tells QtPy to use PySide2
from qtpy.QtWidgets import QMainWindow, QApplication
# ryvencore-qt
import ryvencore_qt as rc
from nodes import export_nodes
if __name__ == "__main__":
# first, we create the Qt application and a window
app = QApplication()
mw = QMainWindow()
# now we initialize a new ryvencore-qt session
session = rc.Session()
session.design.set_flow_theme(name='pure light') # setting the design theme
# and register our nodes
session.register_nodes(export_nodes)
# to get a flow where we can place nodes, we need to crate a new script
script = session.create_script('hello world', flow_view_size=[800, 500])
# getting the flow widget of the newly created script
flow_view = session.flow_views[script]
mw.setCentralWidget(flow_view) # and show it in the main window
# finally, show the window and run the application
mw.show()
sys.exit(app.exec_())
Error I got:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~/.local/lib/python3.10/site-packages/qtpy/__init__.py in <module>
209 try:
--> 210 from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
211 from PySide.QtCore import __version__ as QT_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
PythonQtError Traceback (most recent call last)
/tmp/ipykernel_76029/2915130589.py in <module>
2 import os
3 os.environ['QT_API'] = 'pyside2' # tells QtPy to use PySide2
----> 4 from qtpy.QtWidgets import QMainWindow, QApplication
5
6 # ryvencore-qt
~/.local/lib/python3.10/site-packages/qtpy/__init__.py in <module>
214 PYSIDE = True
215 except ImportError:
--> 216 raise PythonQtError('No Qt bindings could be found')
217
218 # If a correct API name is passed to QT_API and it could not be found,
PythonQtError: No Qt bindings could be found
Then I ran : pip install --upgrade PySide
and got error again :
Defaulting to user installation because normal site-packages is not writeable
Collecting PySide
Using cached PySide-1.2.4.tar.gz (9.3 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Note: you may need to restart the kernel to use updated packages.
from ryvencore-qt.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ryvencore-qt.