[PyKDE] QTableWidget vs. QTableView

bastian salmela basse at kulma.org
Wed Jun 21 10:31:54 BST 2006


yes, that works, but I am using this a bit differently.
I am using designer to do the interface, and I have frame promoted to 
customwidget. and then I use uic.loadUiType() to load up the .ui file on my 
main program.
the code i showed you, is the custom widget .py file, and for some reason, 
if i use QTableWidget, i get blank, but as soon as i use QTableView it 
shows. 

.b 

> ------------------------------
> From: Andreas Pakulat <apaku at gmx.de>
> The following code works perfectly here: 
> 
>>>> from PyQt4.QtGui import QApplication,QTableWidget
>>>> import sys
>>>> class mytable(QTableWidget):
> ...   def __init__(self, parent=None):
> ...     QTableWidget.__init__(self, parent)
> ...     self.setRowCount(8)
> ...     self.setColumnCount(2)
> ...
>>>> app=QApplication(sys.argv)
>>>> t=mytable()
>>>> t.show()
>>>> app.exec_()
> 
> Shows a table with 2 columns and 8 rows. I think the error is somewhere
> else in the rest of your code... 
> 
> Andreas 
> 
> -- 
> You will be surprised by a loud noise.
 

kulma.org -- the works 





More information about the PyQt mailing list