title: Qt and SQLite can't handle 'NULL' values or i'm doning something wrong?
body: <p>If i create a table using Qt and SQLite that has a nullable columns (columns without "NOT NULL") and add a null value into it (using NULL <code>QVariant</code>) retrieving such value back will return not and NULL <code>QVariant</code>, but <code>QVariant</code> of type <code>String</code> and value <code>""</code>. Am i doing something wrong or Qt with SQLite can't distinguish between <code>NULL</code> value in database and default value (0, "", default date ect)? My test code:</p>
  
  <pre><code>#include &lt;QtCore/QCoreApplication&gt;
  #include &lt;QSqlDatabase&gt;
  #include &lt;QSqlQuery&gt;
  #include &lt;QVariant&gt;
  #include &lt;QSqlRecord&gt;
  
  int main(int argc, char *argv[])
  {
    QCoreApplication a(argc, argv);
    QSqlDatabase db = QSqlDatabase::addDatabase( "QSQLITE" );
    db.setHostName( "MyHost" );
    db.setDatabaseName( "c:\\tmp\\db.sql" );
    db.open();
  
    QSqlQuery( "CREATE TABLE a ( b INT )", db );
    QSqlQuery query( db );
    query.prepare( "INSERT INTO a ( b ) VALUES ( :b )" );
    //  Insert NULL value into table (NULL variant).
    query.bindValue( ":b", QVariant( QVariant::Int ) );
    query.exec();
    query = QSqlQuery( "SELECT * FROM a", db );
    query.next();
    //  Get value from table - it has type string and is "".
    QVariant val = query.value( query.record().indexOf( "b" ) );
    QVariant::Type type = val.type();
    QString str = val.toString();
  }
  </code></pre>