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. Updating Local Storage in WorkerScript
Forum Updated to NodeBB v4.3 + New Features

Updating Local Storage in WorkerScript

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.5k 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.
  • D Offline
    D Offline
    Duff
    wrote on 31 Jul 2014, 18:43 last edited by
    #1

    I see we can not use .import to access the LocalStorage namespace in a workerscript file. I want to update my local storage sqlite db in a separate thread to avoid interfering with the main gui thread. Is there a workaround?

    --Duff

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p3c0
      Moderators
      wrote on 2 Aug 2014, 14:17 last edited by
      #2

      As per this "doc":http://qt-project.org/doc/qt-5/qml-qtquick-workerscript.html#restrictions there's no way around.

      bq. This means that unlike an ordinary JavaScript file that is imported into QML, the script.js in the above example cannot access the properties, methods or other attributes of the QML item, nor can it access any context properties set on the QML object through QQmlContext.

      157

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Duff
        wrote on 2 Aug 2014, 15:13 last edited by
        #3

        I guess its a job for c++

        --Duff

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p3c0
          Moderators
          wrote on 2 Aug 2014, 15:18 last edited by
          #4

          Yes if you are familiar with c++ go for c++ for such this job. Personally i would always opt for c++ over javascript wherever possible.

          157

          1 Reply Last reply
          0

          1/4

          31 Jul 2014, 18:43

          • Login

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