-
-
Notifications
You must be signed in to change notification settings - Fork 253
Support for executing SQL on layers #6035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@gitpydev , we don't ship with that QML module (yet), I've marked this as an enhancement request. Which item were you interested in? |
Uh huh, perhaps I need more code reading, I thought the whole qtdeclarative submodule had been included. |
@gitpydev , that module was added in Qt 6.2 and doesn't appear to be built by default (https://github.com/qt/qtdeclarative/blob/63646efa485b8f5ef00c1e7dadbfa69bb157f05f/src/CMakeLists.txt#L72-L74), at least not on vcpkg. |
I see, plenty of helps for me, thanks a lot for nirvn's nice replies. Before trying to utilize this local file accessing capability provided by Qml, I also tried to utilize the built-in capability provided by QField itself, aka the platformUtilityies.import* Q_INVOKABLE API, which were used by importing local project files etc., I could invoke it successfully in a plugin's main.qml, but finally found it not general enough for local file accessing purpose, more like for dedicated purpose. Anyway, QField is really a great open source project, praising. |
By the way, will QField plugins consider adding support for QtQuick.LocalStorage Module? It would be convenient utilizing this module for sqlite db accessing which is also suitable for gpkg files. |
There's also QfDialog to show dialogs, do you need access to system dialogs via Are you confident that you'll be able to interact with gpkg through |
Thanks m-kuhn for your reply. Generally speaking, I just want to access local file in qfield's qml plugin code in android platform, after searching for related API in qfield itself, I couldn't find one for this purpose. So I put my eyes on the Qml's FileDialog Component which is provided by QtQuick.Dialog Module. So actually I am not about to show dialogs but find ways to access local file. It's true that managing gpkg file with plain QtQuick.LocalStorage which is for general sqlite db file won't be a satisfying way, but at least providing a convenient way to acess it compared to reading the file content out and parsing it manually as sqlite/gpkg format. |
@gitpydev I believe we would ideally look for exposing qgis-native API's to execute SQL on the layer source (similar to what with the db manager / browser can be done in QGIS). This way we will have proper access to the providers of loaded layers which should be the most powerful, safe and future proof approach. |
@m-kuhn Having SQL access to the layer source would add lots of flexibility for plugin development. I would love to have that! |
What is the bug or the crash? What were your expectations and what actually happened?
AFAIK, v3.5.0's Plugin System is including qt6's qtdeclarative module which is with QtQuick.Dialogs Module and QtQuick.Controls Module, but only the latter could be imported in a plugin's main.qml file, and the Dialogs one could not be imported normally.
Steps to reproduce the issue
Write a main.qml with QtQuick.Dialogs imported, and this plugin wouldn't load normally.
Version
3.5.0
Operating system name
Android
Operating system version
10
Reinstall QField
Additional context
No response
The text was updated successfully, but these errors were encountered: