[Solved]QImageWriter~initial bug
-
@void SQLite::addImage(QImage image, QStringList tags)
{
QBuffer buffer;
QImageWriter writer(&buffer,"PNG");writer.write(image); QSqlQuery qry; int id; qry.prepare( "SELECT COUNT(*) FROM images" ); qry.exec(); qry.next(); id = qry.value(0).toInt() + 1; qry.prepare( "INSERT INTO images (id, data) VALUES (:id, :data)" ); qry.bindValue( ":id", id ); qry.bindValue( ":data", buffer.data() ); qry.exec(); foreach( QString tag, tags ) addTag( id, tag );
}@
enviroment:
Qt Creator 2.0.1
based on Qt 4.7.0(32bit)
My os is micorsoft xp
Is there some body can help me to shooting this bug. Thank you very much!..\SqlDialog\sqlite.cpp: In member function 'void SQLite::addImage(QImage, QStringList)':
..\SqlDialog\sqlite.cpp:118: error: variable 'QImageWriter writer' has initializer but incomplete type
..\SqlDialog\sqlite.cpp: In member function 'QImage SQLite::getImage(int)':
..\SqlDialog\sqlite.cpp:151: error: variable 'QImageReader reader' has initializer but incomplete type
-
I'm just guessing but based on my experience with this gcc error messaged you might be missing some includes.