March 20, 2012

master huang master huang
Lab Rat
3 posts

A simple question of QSqlQuery but I can‘t solve it????help!!!


now I have define the object of QSqlQuery like this:“QSqlQuery query; query exec(……);”
but why it shows the mistake of “error: ‘query’ was not declared in this scope…..”;I spend several hours to find it why,but I’m failed.
please help me,thanks..

2 replies

March 20, 2012

kunashir kunashir
Lab Rat
35 posts

Check you pro-file, It have next:
QT += core gui network sql // <<<

#include <QtSql>
#include <QSqlQuery>

in your source file.

March 20, 2012

Lukas Geyer Lukas Geyer
Lab Rat
2068 posts

On a sidenote: adding multiple punctuation marks at the end or in between your question does not emphasis the importance of your question, it just keeps some people away from reading your post at all, as such a behaviour can be seen as a major annoyance.

If you want to get the most of these forums (or forums in general) make sure you have read this [] at least once.

  ‹‹ Problem resizeing Qtablerow row hight      A new question about database???? ››

You must log in to post a reply. Not a member yet? Register here!