C++ (Qt)void QAbstractItemModel::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ) [signal]
C++ (Qt)connect(tempModel,SIGNAL(dataChanged(QModelIndex,QModelIndex)),tempModel,SLOT(editFinish()));
C++ (Qt)connect(tempModel,SIGNAL(dataChanged(QModelIndex,QModelIndex)),tempModel,SLOT(editFinish(QModelIndex)));
C++ (Qt)QStandardItem* itemFromIndex ( const QModelIndex & index ) const
C++ (Qt)void uslStandardItemModel::editFinish(QModelIndex index){ if (index.column() == 2 || index.column() == 4) { qDebug() << "Цена:" + itemData(index).value(2).toInt(); qDebug() << "Кол: " + itemData(index).value(4).toInt(); double summa = this->itemData(index).value(2).toDouble() * this->itemData(index).value(4).toInt(); qDebug() << summa; }}