[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Model/View trouble
From:       <nikitin () komset ! ru>
Date:       2007-09-28 5:15:24
Message-ID: 639009036.20070928091524 () komset ! ru
[Download RAW message or body]

Hello,

I have trouble with Model/View in PyQt 4.3.0-b1
(PyQt-Py2.5-gpl-4.3.0-b1.exe). My program using model inherit
by QtCore.QAbstractTableModel and view inherit by QtGui.QTableView.
In model I reimplement method data, like this:

def data(self, index, role = Qt.DisplayRole):
  if not index.isValid():
    return QtCore.QVariant()
  col = index.column()
  row = index.row()
  ....

In runtime I got unexpected exception, when trying to scroll data in
view or change view column width.

Traceback (most recent call last):
  File "D:\work\source\branch-2007-08-28\lib\py\kutil\gui\qtw\TableView.py", line 261, in data
    if not index.isValid():
RuntimeError: underlying C/C++ object has been deleted

How is it possible?

-- 
Best regards,
Artem Nikitin

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic