<div>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:</div>
<div> </div>
<div> def rowCount(self, index=QModelIndex()):<br> return len(self.uncertainties)<br> <br> def columnCount(self, index=QModelIndex()):<br> return len(Uncertainty.uncertaintyAttrList)</div>
<div> </div>
<div> def headerData(self, col, orientation, role):<br> if orientation == Qt.Horizontal and role == Qt.DisplayRole:<br> return Uncertainty.uncertaintyAttrList[col]<br> return None </div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">On Fri, Apr 23, 2010 at 9:01 AM, Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On 23.04.10 08:36:22, Bjorn Egil Ludvigsen wrote:<br>> Hi,<br>><br>> I cannot get any data to be shown in my QTableView and wonder now if<br>> something could be wrong with returning the QVariants(), as someone on<br>
> Daniweb said this is not necessary anymore after PyQt 4.6. Also I read the<br>> PyQt documentation about QVariant, but have not gotten any further.<br>><br>> Without giving you the whole nine yards, can anyone spot any beginners error<br>
> below? The data itself is loaded into a list (self.uncertainties) of<br>> Uncertainty() objects. An Uncertainty() has 22 attributes that I want to<br>> show in a table.<br><br></div>Unless you deliberitly left these out the below model misses<br>
implementations for at least rowCount and columnCount.<br><br>Andreas<br><font color="#888888"><br>--<br>It was all so different before everything changed.<br>_______________________________________________<br>PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></font></blockquote></div><br>