Hi, every body

i have a probleme with inserting a row from a table call tableProduct to another table call tableSalle

when the user click entre key in the first table “tableProduct”

i can’t figured out, how this work

this is an image explains what i means

sell1.jpg

i think we implement insertrow function


bool MyModel::insertRows(int position, int rows, const QModelIndex &parent)
{
beginInsertRows(QModelIndex(), position, position+rows-1);
// i want to get the event when the user click "Keydown"
if (true)
{
// we add row with empty fields to allow user to fill them
}


endInsertRows();
return true;
}