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. Extending LocalStorage
QtWS25 Last Chance

Extending LocalStorage

Scheduled Pinned Locked Moved QML and Qt Quick
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.
  • T Offline
    T Offline
    TheCreativeMind
    wrote on last edited by
    #1

    Hey Guys,

    I am pretty new to C++ and QML and this might be a pretty easy question for you to answer. Rummaging through various forums and tutorials however hasn't revealed a solution for my problem so far.

    Okay now to my problem: I want to extend the range of functions for the QtQuick LocalStorage Plugin, namely encrypt the sqlite database. So far I managed to compile a sqlite driver with SQLCIPHER support.

    Now I want to write my own localstorage plugin i.e. Inherit from the QQuickLocalStorage class and extend the openDatabaseSync function with an additional passkey argument.

    The problem is that I cannot find the correct include path to let my class inherit from the QQuickLocalStorage class which is used in the original QtQuick.LocalStorage.

    Any suggestions how to solve this problem?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      z.emb
      wrote on last edited by
      #2

      As far as I understand this, there is no benefit to inherit from QQuickLocalStorage, which consists only of one (non-virtual) function anyway. Its also just a .cpp file, no headers (Src\qtdeclarative\src\imports\localstorage\plugin.cpp) and a lot usage of internal/private qml engine stuff.

      I would suggest that you write your own custom plugin, which handles the sql logic in C++.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TheCreativeMind
        wrote on last edited by
        #3

        Thx for the quick answer.

        And yes, after spending hours on finding a proper solution this is definitely is the easier way of doing it.

        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