Start by reading the docs for QSqlDatabase. If that doesn't help, browse Qt examples related to SQL.