I found the problem (not the solution)
QAbstractItemModel::match compares each value from the model with the searched value and return the indexes that match.
it uses the operator== method of QVariant, but it doesn't work fine
my table is table.PNG
I getQt Code:
miConsulta->setQuery("Select Valor, Descripcion From myTable");To copy to clipboard, switch view to plain text mode
var1
value: 0
type: QVariant(int)
isnull: false
var2
value:0
type: QVariant(int)
isnull: true
but var1==var2 return TRUE !!!!!!!!!
how can a null variant be equal to anything?????????
can somebody explain?
thank's
Bookmarks