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. Are there more resources for programming with Databases?

Are there more resources for programming with Databases?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.3k 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.
  • B Offline
    B Offline
    bobby
    wrote on 6 May 2011, 19:09 last edited by
    #1

    Hello,

    I've used Qt before for a few simple projects but now I'm really getting my hands dirty. I've seen this: "Connecting To Databases with SQL":http://doc.qt.nokia.com/4.7/sql-connecting.html but I'm looking for more. Has anyone found a really good resource for Qt w/DB, specifically Postgres, but any SQL centric paper/tutorial/etc will do fine. Also, any good book recommendations outside of the "C++ Programming with Qt 4 Second Ed":http://www.amazon.com/gp/product/0132354160/ref=ase_trolltech/ book?

    "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
    ---Source unknown

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 6 May 2011, 19:36 last edited by
      #2

      Purpose of the SQL layer is to abstract the various database servers into a unified API. It should be straight forward to adapt the samples to your individual database environment.

      Apart from the lower level direct database classes like "QSqlDatabase":http://doc.qt.nokia.com/4.7/qsqldatabase.html and "QSqlQuery":http://doc.qt.nokia.com/4.7/qsqlquery.html, there are convenience classes for the "model/view":http://doc.qt.nokia.com/4.7/model-view-programming.html classes of Qt: "QSqlQueryModel":http://doc.qt.nokia.com/4.7/qsqlquerymodel.html, "QSqlTableModel":http://doc.qt.nokia.com/4.7/qsqltablemodel.html and "QSqlRelationalTableModel":http://doc.qt.nokia.com/4.7/qsqlrelationaltablemodel.html

      Your question is quite vague, so it's hard to give you any advice. Do you have any specific questions or problem you're facing?

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bobby
        wrote on 6 May 2011, 20:14 last edited by
        #3

        Thanks Volker!

        I think this might be a good start. Initially I want to make a GUI front end to manage an existing set of databases. I'll need to connect to a DB server with a username/pass and return a list of databases, then backup/restore/etc them.

        "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
        ---Source unknown

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on 6 May 2011, 22:07 last edited by
          #4

          While you can get the databases/tables from the catalog quite easily, I would go with the native tools for backup/restore procedures (you can call the command line tools with QProcess). There is hardly any support for this from Qt side.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0

          1/4

          6 May 2011, 19:09

          • Login

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