Dear All
I have a function like this
double form
::calculate(const QString &) {
id_st= id;
load();
return spin->value();
}
double form::calculate(const QString &)
{
id_st= id;
load();
return spin->value();
}
To copy to clipboard, switch view to plain text mode
I try to call this function from
{
if (value.isValid() && role == Qt::DisplayRole) {
if (index.column() == 5){
calculate(index.sibling(index.row(),3).data().toString());
}
return value.toString().leftJustified(true);
}
return value;
}
QVariant CustomSql::data(const QModelIndex &index, int role) const
{
QVariant value = QSqlTableModel::data(index, role);
if (value.isValid() && role == Qt::DisplayRole) {
if (index.column() == 5){
calculate(index.sibling(index.row(),3).data().toString());
}
return value.toString().leftJustified(true);
}
return value;
}
To copy to clipboard, switch view to plain text mode
I get the error for discard qualifiers ? How can I solve this one?
Bookmarks