[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] tableview and model
From: David Boddie <david () boddie ! org ! uk>
Date: 2006-02-26 14:26:18
Message-ID: 200602261526.19187.david () boddie ! org ! uk
[Download RAW message or body]
On Sat, 25 Feb 2006 17:12:58, Olivier Fournier wrote:
> It's what I 've write in first but it's doen't work
> model is a locale variable for my __init__ classe.
This class works for me:
from PyQt4.QtCore import QObject
from PyQt4.QtGui import QStandardItemModel, QTableView
class A(QObject):
def __init__(self):
QObject.__init__(self)
self.tableView = QTableView()
model = QStandardItemModel(3, 3, self)
self.tableView.setModel(model)
self.tableView.show()
Note that the A class is a subclass of QObject and that I call the
QObject's __init__ method from my __init__ method.
Hope this helps,
David
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic