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
Qt Code:
  1. QVariant var1=QVariant(0); // variant containing the integer 0
  2.  
  3.  
  4. miConsulta->setQuery("Select Valor, Descripcion From myTable");
  5. QVariant var2=miConsulta->record(0).value(0);
To copy to clipboard, switch view to plain text mode 
I get
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