2012-03-24 9 views
0

信号を送信して2つのパラメータを送信しようとしています.1つはSongオブジェクトのリストで、もう1つはQtGui.QTableViewオブジェクトです。C++タイプのスロット引数がサポートされていません

私はそれをやってみました:

self.emit(QtCore.SIGNAL("searchOutput(list, QtGui.QTableView)"), songsObjs, self.table) 

しかし、私は次のエラーを取得:

TypeError: C++ type 'list' is not supported as a slot argument type 

私は何ができますか?

答えて

5

あなたはreferenceを見てみると、それはだからこれを行うには代わりにしようと

It is possible to pass any Python object as a signal argument by specifying PyQt_PyObject as the type of the argument in the signature.

While this would normally be used for passing objects like lists and dictionaries as signal arguments, it can be used for any Python type.

言う:

self.emit(QtCore.SIGNAL("searchOutput(PyQt_PyObject, QtGui.QTableView)"), songsObjs, self.table) 
関連する問題