As a follow-up, I'm using registerCustomWidget for the promoted widgets: loader = QUiLoader() loader.registerCustomWidget(pg.GraphicsLayoutWidget) loader.registerCustomWidget(pg.widgets.TreeWidget) loader.registerCustomWidget(pg.parametertree.ParameterTree)
---- Tim Williams On Fri, Jan 29, 2021 at 7:29 PM [email protected] <[email protected]> wrote: > HI, > > (Sorry about the formatting - not used to google groups posting.) > > I have an application I'm trying to get working with PySide2. I made > changes following the example designerExample.py . > <https://github.com/pyqtgraph/pyqtgraph/blob/master/examples/designerExample.py> > Everything seems to work fine with PyQt5, but when I try to use PySide > everytime I try to do a ParameterTree.setParmeters() I get an error like > this: > > File > "C:\Users\Tim\pyside2_env\lib\site-packages\pyqtgraph\parametertree\ParameterTree.py", > line 48, in setParameters > self.clear() > File > "C:\Users\Tim\pyside2_env\lib\site-packages\pyqtgraph\parametertree\ParameterTree.py", > line 85, in clear > self.invisibleRootItem().takeChildren() > File > "C:\Users\Tim\pyside2_env\lib\site-packages\pyqtgraph\widgets\TreeWidget.py", > line 390, in takeChildren > childs = self._real_item.takeChildren() > RuntimeError: Internal C++ object (PySide2.QtWidgets.QTreeWidgetItem) > already deleted. > > I'm using PySide2.QUiTools.QuiLoader().load to load my UI file for > PySide2, and > uic.loadUI for PyQt5. > > with importlib.resources.path('nvfieldcap.resources.ui', > 'paramtreeDialog.ui') as uifilename: > if 'PySide2' in sys.modules: > self.dialog = loader.load(uifilename.as_posix()) > if 'PyQt5' in sys.modules: > self.dialog = QtWidgets.QDialog() > uic.loadUi(uifilename.as_posix(), self.dialog) > > -- > You received this message because you are subscribed to a topic in the > Google Groups "pyqtgraph" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pyqtgraph/uv2uyQCu9MM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pyqtgraph/f04abdf3-068a-41c4-a993-6076713ca61an%40googlegroups.com > <https://groups.google.com/d/msgid/pyqtgraph/f04abdf3-068a-41c4-a993-6076713ca61an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CAO39LaQG6Rxbss-AgrE_zeSbRRUuimGh-e6B14HOVHZQVSEAnA%40mail.gmail.com.
