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

PySide2 support #162

Open
markeastwood82 opened this issue May 13, 2020 · 1 comment
Open

PySide2 support #162

markeastwood82 opened this issue May 13, 2020 · 1 comment
Labels
PyQt5/PySide2 Topics on the use of PyVista in Qt/PySide apps

Comments

@markeastwood82
Copy link

I have seen that this issue has had numerous tickets before, but they didn't help and are all currently closed.

I am running:
python 3.7.6 (64 bit)
vtk 8.2.0
pyvista 0.24.1
pyside2 5.13.2

All installed by Anaconda3 2020.02. I've not modified anything besides creating an environment to install the required components (including pyside2). I can run PyVista fine without Qt.

Trying out the code from issue #44 I get the following error message

Traceback (most recent call last):
  File "C:\Users\User\Documents\Mark\Code\pyvista-muck\inaqt.py", line 56, in <module>
    window = MainWindow()
  File "C:\Users\User\Documents\Mark\Code\pyvista-muck\inaqt.py", line 24, in __init__
    self.vtk_widget = pv.QtInteractor(self.frame)
  File "C:\Users\User\anaconda3\envs\MPos\lib\site-packages\pyvista\plotting\qt_plotting.py", line 449, in __init__
    self.render_timer = QTimer(parent=parent)
TypeError: QTimer(parent: QObject = None): argument 'parent' has unexpected type 'PySide2.QtWidgets.QFrame'

Is there any trick needed in order to get that code to work?

@GuillaumeFavelier GuillaumeFavelier added the PyQt5/PySide2 Topics on the use of PyVista in Qt/PySide apps label May 13, 2020
@GuillaumeFavelier
Copy link

I'm sorry, I would love to help with this but I can't even manage to make a hello world example work with PySide2 on my config:

# Import PySide2 classes
import sys
from PySide2 import QtCore, QtWidgets

# Create a Qt application
app = QtWidgets.QApplication(sys.argv)

# Create a Window
mywindow = QtWidgets.QWidget()
mywindow.resize(320, 240)
mywindow.setWindowTitle('Hello World!')

# Create a label and display it all together
mylabel = QtWidgets.QLabel(mywindow)
mylabel.setText('Hello World!')
mylabel.setGeometry(QtCore.QRect(200, 200, 200, 200))

mywindow.show()

# Enter Qt application main loop
sys.exit(app.exec_())

I got this error instead:

ImportError: /usr/lib/libgssapi_krb5.so.2: undefined symbol: k5_externalize_context, version krb5_3_MIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyQt5/PySide2 Topics on the use of PyVista in Qt/PySide apps
Projects
None yet
Development

No branches or pull requests

2 participants