[PyKDE] Newbie: Problem with QTable
Jeff Layton
laytonjb at bellsouth.net
Sun Apr 28 21:04:00 BST 2002
Hello,
I hate to bother everyone, but I'm trying to figure out how to
use QTable. I cooked up a small code that doesn't work (natch).
I'm attaching the code, but here's the error messages I receive:
[laytonj at home2 PYQT]$ /usr/local/python-2.2.1/bin/python table1.py
Traceback (most recent call last):
File "table1.py", line 17, in ?
table=MyTable(numRows, numCols)
File "table1.py", line 12, in __init__
self.setCaption("Table1")
AttributeError: sipThis
I've built and installed python-2.2.1 in /usr/local/python-2.2.1, sip
3.1 in /usr/local/sip-3.1, qt 3.0 in /usr/local/qt, and PyQt-3.1 in
/usr/local/PyQt-3.1.
Could anybody give a newbie some pointers?
TIA,
Jeff
-------------- next part --------------
import sys
from qt import *
import qttable
numRows=20
numCols=20
class MyTable( qttable.QTable ):
def __init__(self, rows, cols):
""" help me """
self.setCaption("Table1")
app=QApplication(sys.argv)
table=MyTable(numRows, numCols)
app.setMainWidget(table)
table.show()
app.exec_loop()
More information about the PyQt
mailing list