Commits

Virgil Dupras committed 011ec9c

In the table, call setModel() before setting the model's view to avoid a crash on selection updating (selectionModel() is None until a model has been set).

Comments (0)

Files changed (1)

         QAbstractTableModel.__init__(self)
         self.model = model
         self.view = view
+        self.view.setModel(self)
         self.model.view = self
-        self.view.setModel(self)
         if hasattr(self.model, 'columns'):
             self.columns = Columns(self.model.columns, self.COLUMNS, view.horizontalHeader())