On 4/10/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote: > This one's easy: The model instance is local to the test function and > thus gets garbage collected when test ends. So the Tree doesn't have a > model to work with at that point. Changing test to > > def test(self): > self.model = TreeModel() > self.treeView.setModel(self.model) > > makes the app work. Or you could make the TreeModel a child of the > treeView or some other QObject derived instance that you have. It's just > important that at least 1 reference to the created object is available > after the function is done so the object is not gc'ed.
Hmm, I hadn't tested your solution yet. Now I did, however I still have the same problem. Regards, Bert _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
