void TableEditor::endEdit(int row,int col,bool accept,bool replace) { Q3Table::endEdit(row,col,accept,replace); setCellContentFromEditor(row,col); if(isEmptyRow(row)) if(numRows()>1) removeRow(row); if(!isEmptyRow(numRows()-1)) addEmptyRow(); }
void MTable::endEdit( int row, int col, bool accept, bool replace ) { QWidget *editor = cellWidget( row, col ); if ( !editor ) return; if (!editor->inherits("QComboBox")){ QTable::endEdit( row, col, accept, replace ); zap(editor); //if (editor) delete editor;// <== this seems neccessary to return control to the Table return; } else{ setCellContentFromEditor( row, col ); if ( row == currEditRow() && col == currEditCol() ) setEditMode( NotEditing, -1, -1 ); viewport()->setFocus(); updateCell( row, col ); clearCellWidget( row, col ); zap (editor); //if (editor) delete editor;// <== this seems neccessary to return control to the Table emit valueChanged( row, col ); } }