sfdk-qmltypes
Generate QML type description JSON files
TLDR
Generate qmltypes files
Generate qmltypes files without deploying them (usually to emulator)
Generate qmltypes files without restoring the emulator after deployment
Generate qmltypes files and restore the emulator after deployment even on failure
Generate qmltypes files without reverting changes which only include removal of statements with sdk-make-qmltypes:keep in comments
SYNOPSIS
sfdk qmltypes [OPTIONS] [ARGUMENTS]
PARAMETERS
--plugin <path>
Specifies the path to a QML plugin (e.g., an .so
file or directory) to be analyzed for exported QML types.
--module <name>
Specifies a QML module name to analyze. The tool will attempt to locate and inspect the module based on standard QML import paths.
--list-types
Outputs a list of all detected QML types, including their module, version, and type name, found during the analysis.
--list-plugins
Outputs a list of QML plugins that were found and processed, along with their associated modules.
--json
Formats the output in JSON, which is useful for programmatic parsing and integration into automated workflows.
-h, --help
Displays a concise help message detailing command usage and available options.
DESCRIPTION
sfdk-qmltypes is a specialized utility within the Sailfish OS SDK, designed to analyze and present information about QML types. It enables developers to inspect QML modules, plugins, and applications to understand which QML types they export, import, or make available to the QML engine. This command is invaluable for verifying correct QML module registration, debugging type resolution issues, and ensuring that all necessary QML components are properly exposed and discoverable within the QML type system. Developers typically use it during the build and packaging process to confirm that their QML-based applications and libraries correctly expose their interfaces, facilitating smooth integration and operation on Sailfish OS devices.
CAVEATS
The accuracy of sfdk-qmltypes depends on the correct environment setup, particularly the QML import paths. If the tool cannot locate the necessary QML modules or plugins, it may report incomplete or no type information. It primarily analyzes compiled QML plugins and registered modules, not raw QML files directly without a module context.
USAGE CONTEXT
This command is typically used by developers building Sailfish OS applications that utilize QML. It assists in verifying that QML plugins correctly expose their types, preventing runtime errors related to missing or unregistered components. It's often integrated into build scripts to automate QML type verification.
HISTORY
sfdk-qmltypes is an integral part of the Sailfish OS SDK, evolving alongside the SDK's development. Its introduction reflects the growing importance of robust QML tooling for application development on Sailfish OS, providing developers with dedicated capabilities to manage and verify QML type systems, which are foundational to Qt and QML-based applications.