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. How to Install QSparql
Forum Updated to NodeBB v4.3 + New Features

How to Install QSparql

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 3 Posters 3.8k 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
    akazad
    wrote on last edited by
    #1

    Hi,
    Can anybody help on this that how I can install or configure QSparql. So that I can import it in QML file.

    Br,
    AKA

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

      What did you try so far?

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

        Thanks,
        I have been trying to get some data related to incoming phone call, caller info, alarm info from date-time settings etc.

        I have not find any API in Qt itself but probably possible from Sparql query language.

        1 Reply Last reply
        0
        • N Offline
          N Offline
          ngocketit
          wrote on last edited by
          #4

          Don't know if this works for you but I can install QSparql with this command: sudo zypper install libqtsparql libqtsparql-devel.

          Or you can check out the code directly from git://gitorious.org/maemo-af/qsparql.git and then build it yourself.

          For using QSparql in QML, check it here: http://kdedevelopers.org/node/4340

          1 Reply Last reply
          0
          • A Offline
            A Offline
            akazad
            wrote on last edited by
            #5

            Many Thanks,

            one more thing is any idea that how to update the SparqlResultsList in application runtime. For example if there is a Timer and it updates SparqlResultsList in every 5 sec.

            So, any method in SparqlResultsList to call to execute the query again. I have some situation that require to update UI when ever some new data arrive.

            Another question is in which OS environment did you try this command : sudo zypper install libqtsparql libqtsparql-devel

            1 Reply Last reply
            0
            • N Offline
              N Offline
              ngocketit
              wrote on last edited by
              #6

              Well, as you can see when looking at the code of QSparqlResultsList, neither setQuery() nor reload() checks for query change, so, I think you can make it query again by setting the same query for every 5 sec. reload() is a public function but since it's not exported to QML then you can't use it inside your QML code.
              @
              QSparqlResultsList::setQuery(const QString &query)
              {
              d->query = query;
              reload();
              }

              void QSparqlResultsList::reload()
              {
              if (d->options == 0 || d->query.isEmpty())
              return;
              if (d->result != 0) {
              if (!d->result->isFinished())
              return;
              else
              delete d->result;
              }
              delete d->connection;
              d->connection = new QSparqlConnection(d->options->driverName(), d->options->options());
              d->result = d->connection->exec(QSparqlQuery(d->query));
              connect(d->result, SIGNAL(finished()), this, SIGNAL(finished()));
              connect(d->result, SIGNAL(finished()), this, SLOT(queryFinished()));
              connect(d->result, SIGNAL(dataReady(int)), this, SLOT(queryData(int)));
              }
              @

              sudo zypper install libqtsparql libqtsparql-devel is for meego sdk.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                akazad
                wrote on last edited by
                #7

                Thanks for sharing good knowledge, actually I was searching QML documentation for QSparqlResultsList element. Haven't seen any.

                But seems still possible to find from its implementation code.

                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