[PySide] QSelectionModel.currentChanged/selectedChanged signals give troubles

Alexey Vihorev vihorev at gmail.com
Thu Jan 16 11:50:50 CET 2014


Hi!

I’ve got a problem trying to connect currentChanged/selectedChanged signals to anything. The code:

 

 

from PySide import QtGui

import sys

 

class MyWin(QtGui.QWidget):

 

    def __init__(self):

        super().__init__()

        self.view = QtGui.QTableWidget(self)

        self.setLayout(QtGui.QHBoxLayout())

        self.layout().addWidget(self.view)

        self.view.selectionModel().currentChanged.connect(self.handler)

 

    def handler(self, *args):

        print('Changed!')

 

 

if __name__ == "__main__":

    app = QtGui.QApplication(sys.argv)

    win = MyWin()

    win.show()

    app.exec_()

 

 

Results:

PySide 1.2.1,  Py3.3.2, win32:

crashes without any output

 

Pyside 1.1.2, Py 3.3.2, Ubuntu 13.10:

 

Traceback (most recent call last):

  File "bugtest2.py", line 23, in <module>

    win = MyWin()

  File "bugtest2.py", line 15, in __init__

    self.view.selectionModel().selectionChanged.connect(self.handler)

TypeError: 'NotImplementedType' object is not callable

 

PyQt4, win32 and Ubuntu – works perfectly.

 

Am I doing something wrong, or is it a bug?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140116/85f1b0cd/attachment.html>


More information about the PySide mailing list