Registry / web-framework / pureqml-controls

pureqml-controls

JSON →
library1.2.0jsnpmunverified

Library of commonly used QML controls for the PureQML QML transpiler. Version 1.2.0 provides components for Canvas, YouTube, Google Charts, native and non-native inputs, mixins, SVG, VK.com, Yandex, and other UI elements. Release cadence is low, as the library is in a maintenance phase. Differentiators include direct integration with PureQML and support for platform-specific components.

npm install pureqml-controls
INSTALL
IMPORT
SIG · PUREQML-CONTROLS
P
pureqml-controls
web-frameworkjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Canvas
import "canvas.qml"
import Canvas
QML imports use relative file paths, not package names.
YouTube
import "youtube.qml"
import YouTube from 'pureqml-controls'
Import via QML file path, not ES module syntax.
GoogleCharts
import "googlecharts.qml"
var GoogleCharts = require('pureqml-controls')
PureQML uses QML import semantics; no CommonJS.

Shows how to use the Canvas component in a QML file with PureQML.

import QtQuick 2.0 import "canvas.qml" as Canvas Rectangle { width: 300; height: 200 color: "white" Canvas.Canvas { anchors.fill: parent onPaint: { var ctx = getContext("2d"); ctx.fillStyle = "red"; ctx.fillRect(10, 10, 100, 100); } } }
Debug
Known issues
gotchaImport paths must be relative to the current QML file, not absolute or package-based.
fix
Use 'import "canvas.qml"' instead of 'import Canvas'.
affects: >=1.0
gotchaComponents may not be available in all PureQML builds; check platform support.
fix
Verify that the desired component (e.g., YouTube) is supported on your target platform.
affects: >=1.0
gotchaThe library is optimized for PureQML transpiler; may not work with standard QML runtimes.
fix
Use PureQML toolchain for development.
affects: >=1.0
Errors
Common errors & fixes
TypeError: Cannot read property 'getContext' of null
Canvas component not correctly imported or instantiated.
fix
Ensure canvas.qml is imported and the Canvas type is used correctly: import 'canvas.qml' as Canvas; then use Canvas.Canvas { ... }.
module 'pureqml-controls' not found
Attempting to use Node.js require or ES import with the package.
fix
PureQML uses QML imports via relative paths; do not use require(). Import the .qml file directly.
QML import: Cannot find component: youtube
youtube.qml not in the QML import path or import statement incorrect.
fix
Copy youtube.qml to the same directory as your main QML file and use import 'youtube.qml'.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pureqml-controls — npm install pureqml-controls · libregistry