Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML only connect to mySQL
Forum Updated to NodeBB v4.3 + New Features

QML only connect to mySQL

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 5.1k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Alcatraz
    wrote on last edited by
    #1

    is there any way to connect to mysql in QML instead of having to use C++ to connect and grab data

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexleutgoeb
      wrote on last edited by
      #2

      Yes, you can use some JavaScript code to connect to a local db, see the SQL Local Storage Example here: http://doc.qt.nokia.com/4.7-snapshot/declarative-sqllocalstorage-hello-qml.html

      Alex

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alcatraz
        wrote on last edited by
        #3

        This don't really answer my question sorry if i was unclear.

        i need to connect to an external MySQL Database that's hosted on another server

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alexleutgoeb
          wrote on last edited by
          #4

          I see, didn't get that from your question at first.

          The linked example only works with a local database, in your case you probably can write your own QML item in C++ and reuse that every time you need QML SQL access. If this doesn't meet your needs I'm out of ideas, sorry.

          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