On 02/14/2014 01:11 PM, igor.mironc...@gmail.com wrote:
> I’m trying to insert new record to the table with:
> QSqlRecord r;
> r.setValue( 0, 0 );
> r.setValue( 1, QString() );
> r.setValue( 2, QString() );
> r.setValue( 3, QString() );
> if( !d->model->insertRecord( -1, r ) )
>
I’ve found the problem... The problem solved with:
QSqlRecord r = d->model->record();
From: igor.mironc...@gmail.com
Sent: Friday, February 14, 2014 2:07 PM
To: interest@qt-project.org
Subject: QSqlTableModel couldn't insert new record.
Hi.
I have the next SQLite table:
QSqlQuery table( QLat
Hi.
I have the next SQLite table:
QSqlQuery table( QLatin1String( "CREATE TABLE IF NOT EXISTS contacts ( "
"marked INTEGER, contact TEXT, ""type TEXT, comment
TEXT )" ) );
And the next QSqlTableModel:
model = new QSqlTableModel( w, db );model->setTable( QLatin1Str