Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Few Questions from beginner

    Qt in Education
    beginner databa qml listview
    3
    5
    1551
    Loading More Posts
    • 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
      witusx93 last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • M
        mcosta last edited by

        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 Reply Quote 0
        • W
          witusx93 @mcosta last edited by

          @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 Reply Quote 0
          • M
            mcosta last edited by

            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 Reply Quote 0
            • P
              PharmAccess last edited by PharmAccess

              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 Reply Quote 0
              • First post
                Last post