QDataTable to bloquer modified value
People, I have a QDataTable, I would like that when a value of the QDataTable was modified, the user I could not more modify, these values I am white.
Here he is form.
http://200.193.29.195/qt3/form.png
In the case above, if the user modified value e if it tried to modify an error message again would be shown. It would like to make this for the application and not for the database.
It is possible to block this with the QDataTable.
Cris
Re: QDataTable to bloquer modified value
You can override one of the protected members of QDataTable to deny an edit if data was already modified.
Re: QDataTable to bloquer modified value
I would like to make something thus.
if ((HCO!="") || (HCO is NULL)) {
msg="Error";
}
Cris
Re: QDataTable to bloquer modified value
My answer still stands - it should be possible to do that by overriding updateCurrent() or beginUpdate().
Re: QDataTable to bloquer modified value
Ok, more I get error trying to use QDataTable::updateCurrent
dataTable->updateCurrent()
Cris
Re: QDataTable to bloquer modified value
Quote:
Originally Posted by
cristiano
dataTable->updateCurrent()
I didn't tell you to call the method but to override it. You have to subclass QDataTable and reimplement the method.