PDA

View Full Version : QDataTable to bloquer modified value



cristiano
14th January 2007, 13:44
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

wysota
14th January 2007, 20:54
You can override one of the protected members of QDataTable to deny an edit if data was already modified.

cristiano
14th January 2007, 21:24
I would like to make something thus.

if ((HCO!="") || (HCO is NULL)) {
msg="Error";
}

Cris

wysota
15th January 2007, 00:28
My answer still stands - it should be possible to do that by overriding updateCurrent() or beginUpdate().

cristiano
17th January 2007, 00:56
Ok, more I get error trying to use QDataTable::updateCurrent

dataTable->updateCurrent()

Cris

wysota
17th January 2007, 01:58
dataTable->updateCurrent()
I didn't tell you to call the method but to override it. You have to subclass QDataTable and reimplement the method.