Add Backspace and Alt+Backspace key support (#705)

This commit is contained in:
Justin Clift
2016-08-05 15:11:04 +01:00
committed by GitHub
parent a39554fd11
commit 985a990868

View File

@@ -195,7 +195,7 @@ void ExtendedTableWidget::keyPressEvent(QKeyEvent* event)
selectedIndexes().at(0).row() == model()->rowCount()-1 && selectedIndexes().at(0).column() == model()->columnCount()-1) {
// If the Tab key was pressed while the focus was on the last cell of the last row insert a new row automatically
model()->insertRow(model()->rowCount());
} else if(event->key() == Qt::Key_Delete) {
} else if ((event->key() == Qt::Key_Delete) || (event->key() == Qt::Key_Backspace)) {
if(event->modifiers().testFlag(Qt::AltModifier))
{
// When pressing Alt+Delete set the value to NULL