Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt in Education
  4. Few Questions from beginner
QtWS25 Last Chance

Few Questions from beginner

Scheduled Pinned Locked Moved Qt in Education
beginnerdatabaqmllistview
5 Posts 3 Posters 1.9k 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.
  • W Offline
    W Offline
    witusx93
    wrote on 14 Apr 2015, 21:36 last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 14 Apr 2015, 22:29 last edited by
      #2

      HI and welcome to devnet,

      1. You can handle database connections using QSqlDatabase class and the whole QtSql module;
      2. Do you want to make queries on DB or something else?

      WHat is your C++ knownledge??

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      W 1 Reply Last reply 15 Apr 2015, 08:27
      0
      • M mcosta
        14 Apr 2015, 22:29

        HI and welcome to devnet,

        1. You can handle database connections using QSqlDatabase class and the whole QtSql module;
        2. Do you want to make queries on DB or something else?

        WHat is your C++ knownledge??

        W Offline
        W Offline
        witusx93
        wrote on 15 Apr 2015, 08:27 last edited by
        #3

        @mcosta
        My C++ knowledge is rather good. I know a lot about classess, object-oriented programming.
        Btw I dont know what i am gonna need according to database. I have never done any database, just know basics queries. But as I said, I want to use database to put my Schedule in it for every day in week and each day filter just the hours with classes.
        Thanks for responding.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on 15 Apr 2015, 08:33 last edited by
          #4

          So,

          your question is not about Qt but about Databases. Probably the wrong forum :D

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            PharmAccess
            wrote on 15 Apr 2015, 09:56 last edited by PharmAccess
            #5

            Since you talked about QML I will assume that you work with embedded devices so SQLite is probably the database for you.
            Here is an example of how to connect to a database, hope this helps:

            QSqlDatabase db = QSqlDatabase::addDatabase("SQLITE");
            db.setDatabaseName("path/to/database.db");
            db.open(); //This will create the database if it doesent exist
            

            Make sure to include

            #include <QSqlDatabase>
            

            Also add

            QT += sql
            

            To your project file

            1 Reply Last reply
            0

            5/5

            15 Apr 2015, 09:56

            • Login

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