Cant connect function to QTableview.selectionModel.selectionChanged

Hello,

I wish to initiate a function call when the user navigates up or down a tableview. A quick search on this says that this should do the trick:
tableview.selectionModel().selectionChagned.connect(myFunc). I am not finding this to be the case with the QT inside of klayout. Is this possible with the implementation in 0.27.3?

Comments

  • I think you're confusing PyQt with KLayout's Qt binding, which is not PyQt (although similar).

    In KLayout, the notation is "add" instead of "connect". There are a number of other differences and in general, KLayout's Qt bindings have not been intended to map every detail of the highly complex Qt API.

    But please update to a later version. 0.27.3 is very old. In case you're on Windows - the latest 0.28.6 version comes with PyQt5 included. For many applications you can code your user interfaces in PyQt then.

    Matthias

  • Oh that is the best news I've heard in a while! I'll transition ASAP.

    Thank you so much!

  • Very good .. let me know if you have trouble with PyQt5. The integration wasn't trivial.

    Matthias

Sign In or Register to comment.