[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Mysterious type error
From: Gottfried_Müller <gottfried.mueller () gmx ! de>
Date: 2017-05-13 15:16:48
Message-ID: 7b32028c-cd50-0c14-f8bd-3a2fbce5200c () gmx ! de
[Download RAW message or body]
I have a mysterious type error and I can't explain it.
In a QListView widget I coded things like this:
class MyWidget(QListView):
data = pyqtSignal(dict)
def __init__(...)
...
self.clicked.connect(self.viewClicked)
...
def viewClicked(self, modelIdx):
viewData = self.model().data(modelIdx, Qt.UserRole)
print('viewDataType', type(viewData))
self.data.emit(viewData)
return
My program crashed with following messages:
viewDataType <class 'dict'>
self.data.emit(viewData)
TypeError: MyWidget.data[dict].emit(): argument 1 has unexpected type
'dict'
This kind of error I have in one of my modules only. In other modules
these code sequences work. I have no idea what is the matter.
Gottfried
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic