Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A simple question of QSqlQuery but I can‘t solve it????help!!!

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    master huang
    wrote on 20 Mar 2012, 07:10 last edited by
    #1

    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..

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kunashir
      wrote on 20 Mar 2012, 07:14 last edited by
      #2

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

      and
      #include <QtSql>
      #include <QSqlQuery>

      in your source file.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgeyer
        wrote on 20 Mar 2012, 07:48 last edited by
        #3

        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":http://www.catb.org/~esr/faqs/smart-questions.html at least once.

        1 Reply Last reply
        0

        3/3

        20 Mar 2012, 07:48

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved