void ConnectionTable::sortColumn( int col, bool ascending, bool ) { horizontalHeader()->setSortIndicator( col, ascending ); if ( isEditing() ) endEdit( currEditRow(), currEditCol(), FALSE, FALSE ); QTable::sortColumn( col, ascending, TRUE ); setCurrentCell( 0, 0 ); emit resorted(); }
QWidget* TeQtBigTable::cellWidget(int row, int col) const { if (row < 0 || col < 0) return 0; if (row == currEditRow() && col == currEditCol()) return editor_; else return 0; }
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 ); } }