Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML and C++ creating/sharing a database?
QtWS25 Last Chance

QML and C++ creating/sharing a database?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
c++sqlite3qml
3 Posts 2 Posters 1.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.
  • DubsD Offline
    DubsD Offline
    Dubs
    wrote on last edited by
    #1

    I need to run an algorithm on data that originates from two different sources:

    1- UART ( raw transducer data)
    2- variables a user inputs into a gui

    The result is then output to the gui for the user to see

    Gameplan:

    • User inputs variables via a gui (written in qml - i actually have no choice on this)
    • The qml creates a database of all variables, then
    • Invokes C++ routines for collecting raw data over a UART , saves it to a file,
    • the C++ module opens up the database and extracts variables needed , opens the file reads in the data, runs the algorithm using both, calculates the answer and writes it to the database,
    • program then jumps back to QML where, later, the QML will go into the database to extract that answer and display it.

    If you see a flaw already please let me know before I spend hours finding out this wont work. If it is plausible.....

    FOUR QUESTIONS:
    (1) who should run the UART - C++ or QML? anyone knows pros /cons? The raw data will have to be post processed so i'm thinking it will need file saving (I'm thinking UART is a C++ thing)

    (2) I need to create a database from user input variables from QML - any one have examples of this?

    (3) - the QML must do a Q_INVOKABLE to the C++ routines (to run the algorithm) . I've already run a test program to prove I can do that so not too worried though if anyone has any examples I'd love to see how others do this.

    (4) BOTH the QML and the C++ need to access (read and write) the database created in (2).
    Is this doable? If so...anyone have any examples of QML and C++ sharing the same database, any code, videos, anything? Should I keep opening and closing the database or is there a way to open it and have some pointer or something be passed around. I can't find anything about QML accepting or passing a pointer.

    Thanks
    Dubs

    (using ARM® Cortex™-A9 embedded linux qt)

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      You can do everything and it isn't so hard. It is a typical scenario with an embedded device with a display (qml, uart, sqlite, tcp ..., This is my core businness).

      I suggest you to study each element or ask to someone to write the app for you and, after that, I suggest you to study it (it is more quickly if you are a beginner).
      Wich kind of device have you to manage? Wich kind of implementation is it for?

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      DubsD 1 Reply Last reply
      0
      • mrdebugM mrdebug

        You can do everything and it isn't so hard. It is a typical scenario with an embedded device with a display (qml, uart, sqlite, tcp ..., This is my core businness).

        I suggest you to study each element or ask to someone to write the app for you and, after that, I suggest you to study it (it is more quickly if you are a beginner).
        Wich kind of device have you to manage? Wich kind of implementation is it for?

        DubsD Offline
        DubsD Offline
        Dubs
        wrote on last edited by
        #3

        @mrdebug

        Thank you for your response!
        Are you saying my plan seems plausible? Have you done these things before or is it an educated guess ?

        I'm in R&D so I can't tell you exactly what we're doing but I can tell you we're using a NXP imX6 with embedded linux and qt and the rest i have to say generalities - a device that measures something and also has user inputs how/what to measure - it's going to run a gui and a uart with data will be coming in both ways ( not at the same time- the gui will say "go" after variable inputs to start a measurement).

        Then I'll need to do computing on all that data and then write results somewhere that will again, be accessed later and printed out to gui.

        I am brand new to Qt but regardless it's my responsibility to get an accurate game plan and pluck away at the pieces.

        I dont and won't have anyone to write me anything. I have no say in that.. such is life.

        that's why - any literature, tutorials, videos that's what i'm searching for/diving into

        thanks for your time, much appreciated!

        1 Reply Last reply
        0

        • Login

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