Hi all,

I have a probably quite stupid question concerning QTableView:
I constructed a tableview and filled it with values. Unfortunately, as soon as I'm doubleclicking on some of the cells (1 double click still works, more double clicks don't), I get a segmentation fault and my gui crashes.
When I'm omitting the "setViewport(QWidget)"-part, I don't have the problem anymore. But the viewport is not set anymore as well

So I'd be glad to either see, what the problem is or get an alternative to setViewport.
I tried to cut down my code a little to make it more clearly.

self._parent.addTab(self.balanceViewSBtab,'SBtab-file')
menu = QtGui.QWidget(self.balanceViewSBtab)
menu.setAutoFillBackground(1)

self.BalanceViewSBtabLayout = QtGui.QGridLayout(menu)

nameLabel = QtGui.QLabel(self.balanceViewSBtab)
nameLabel.setText(''+str(self.fileName)+'')
self.BalanceViewSBtabLayout.addWidget(nameLabel,0, 0)

self.tableView = QtGui.QTableView(self.balanceViewSBtab)
self.tableViewWidget = QtGui.QTableWidget(self.tableView)

self.tableViewWidget.setRowCount(len(self.rows)-1)
self.tableViewWidget.setColumnCount(len(self.colum nNames))
self.tableViewWidget.setHorizontalHeaderLabels(sel f.columnNames)

self.tableViewWidget.resizeColumnsToContents()

#setting the rowheight of the header
self.tableViewWidget.setRowHeight(0,20)

#putting the values into the table
self.rowcounter = 0
for rowcount,row in enumerate(self.rows):
values = row.split('t')
for columncount,value in enumerate(values):
single = QtGui.QTableWidgetItem(value)
self.tableViewWidget.setItem(rowcount,columncount, single)
self.tableViewWidget.setRowHeight(rowcount,20)
self.rowcounter += 1

self.tableView.setViewport(self.tableViewWidget)
self.tableView.setEnabled(1)
self.tableView.show()

I know, it is not the whole code and some variables are not explained. But I'm quite positive, that the mistake lies somewhere around here and especially in the use of QTableView and setViewPort. Probably something has to be set enabled or something like that. Sorry, I'm getting started to PyQt and sending the whole code would be incredibly hard work. Moreover I hope someone knows that problem and can solve it "blindly"...

I'm looking forward to any hints...

Thanks!