LumaPictures / usd-qt

Reusable Qt Components for Pixar's USD
Other
153 stars 41 forks source link

Error changing edit targets #20

Closed csaez closed 5 years ago

csaez commented 5 years ago

Hi there,

Looks like the dataChanged signal fails to get emitted on PyQt5 (it work on PySide, PySide2 and PyQt4).

Traceback (most recent call last):
  File "/home/users/cesars/packages/usd_qt/0.a.3/lib/python/pxr/UsdQtEditors/outliner.py", line 269, in ChangeEditTarget
    self._stage.SetEditTarget(newLayer)
  File "/home/users/cesars/packages/usd_qt/0.a.3/lib/python/pxr/UsdQtEditors/outliner.py", line 123, in _OnEditTargetChanged
    self.dataChanged[QtCore.QModelIndex, QtCore.QModelIndex].emit(
KeyError: 'there is no matching overloaded signal'

Repro:

Here's the code I'm using to run the outliner:

import sys
from Qt import QtWidgets
from pxr.UsdQtEditors import outliner

if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    filepath = './usd_kitchen/Kitchen_set.usd'
    d = outliner.UsdOutlinerDialog.FromUsdFile(filepath)
    d.show()
    sys.exit(app.exec_())

Environment:

nrusch commented 5 years ago

Fixed by #21