FYI, this problem was fixed by using "self.reset()" directly after loading data.
Bjorn On Fri, Apr 23, 2010 at 9:14 AM, Bjorn Egil Ludvigsen <[email protected]>wrote: > Yes thanks, I deliberately left those out, but they are working fine (as I > know by having debug output to my log window) and looks like below. I also > have headerData(). My header is showing up just fine by the way. The > vertical header is not shown, even if I set it to be shown, which is strange > because both rows and columns are returned properly: > > def rowCount(self, index=QModelIndex()): > return len(self.uncertainties) > > def columnCount(self, index=QModelIndex()): > return len(Uncertainty.uncertaintyAttrList) > > def headerData(self, col, orientation, role): > if orientation == Qt.Horizontal and role == Qt.DisplayRole: > return Uncertainty.uncertaintyAttrList[col] > return None > > > > > On Fri, Apr 23, 2010 at 9:01 AM, Andreas Pakulat <[email protected]> wrote: > >> On 23.04.10 08:36:22, Bjorn Egil Ludvigsen wrote: >> > Hi, >> > >> > I cannot get any data to be shown in my QTableView and wonder now if >> > something could be wrong with returning the QVariants(), as someone on >> > Daniweb said this is not necessary anymore after PyQt 4.6. Also I read >> the >> > PyQt documentation about QVariant, but have not gotten any further. >> > >> > Without giving you the whole nine yards, can anyone spot any beginners >> error >> > below? The data itself is loaded into a list (self.uncertainties) of >> > Uncertainty() objects. An Uncertainty() has 22 attributes that I want to >> > show in a table. >> >> Unless you deliberitly left these out the below model misses >> implementations for at least rowCount and columnCount. >> >> Andreas >> >> -- >> It was all so different before everything changed. >> _______________________________________________ >> PyQt mailing list [email protected] >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> > >
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
