• Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SparkQML - A QML Document Viewer for State and Transition Preview

SparkQML

SparkQML is a utility that loads and displays QML document like the qmlscene from Qt SDK. Moreover, it could show all the available states of a component and change to preview the transition effect. It is useful to demonstrate and verify the visual effect of a component.

Component Viewer

Component Browser

Features

  1. Load and display QML document
  2. Show all available states of the QML document. Allow to change for transition effect preview
  3. Convert to image and export to file / clipboard
  4. Read QML_IMPORT_PATH from a file generated by qmake. Easy to integrate with Qt Creator
  5. Browse components in a folder with preview

Command Line Arguments

sparkqml <filename> [qmlimport.path]

filename - The QML file name

qmlimport.path - A file that provides the value of QML_IMPORT_PATH. If this parameter is missing, sparkqml would try to search the file started from the document path to root folder.

Build Instruction

Download and extract the release file from github. Then:

cd app/sparkqml
qpm install
qmake
make

Integration with Qt Creator

  1. Copy the executable built in previous step to somewhere you like

  2. In menu, press "Tools" -> "External" -> "Configure"

  3. Then press "Add" -> "Add Tool". Drag the newly created tool under "Qt Quick" category

You may rename it to “SparkQML Viewer"

  1. Fill in the following values
Executable : The path to the executable

Arguments: %{CurrentDocument:FilePath} %{CurrentProject:Path}/qmlimport.path

It is done. Now you could trigger SparkQML while editing a QML file by “Tools” -> "External" -> "Qt Quick" -> "SparkQML Viewer"

QML_IMPORT_PATH

In case SparkQML can’t display your QML file due to “xxx is not installed” error. Probably is because it can’t locate your package. To fix this problem, you may add the following lines at the end of your pro file:

 write_file(qmlimport.path, QML_IMPORT_PATH)

Then run qmake. It will create a file called qmlimport.path with the value of QML_IMPORT_PATH. You may add this file to your .gitignore.

Restart SparkQML. Now it would know where to find packages.

C++ Module

SparkQML do not understand C++ code. In case you have referred a component from C++. You need to use a mockup project. It is a QML project with package and component same as the C++ plugin but it doesn’t need to implement any logic.

Within SparkQML UI, trigger navigation menu and press "Mockup Project". Then it will open a project called "sparkmockup" in Qt Creator. Then you could create a package and component with name as the C++ module.

For example, if you have a package called "MyApp" and it has a "CustomItem" singleton object. You may add following files to the sparkmockup project:

MyApp/qmldir

CustomItem 1.0 CustomItem.qml

MyApp/CustomItem

import QtQuick 2.0
Item {
}

More Repositories

1

quickflux

A Flux implementation for QML
C++
315
star
2

asyncfuture

Use QFuture like a Promise object
C++
241
star
3

quickandroid

QML Theme and Component Library for Android
QML
234
star
4

ihatecontentfarms

Content Farm Blocker Chrome Extension / 封鎖內容農場Chrome插件
JavaScript
187
star
5

quickpromise

Quick Promise - QML Promise Library
QML
174
star
6

quickios

QML Theme and Component Library for iOS
QML
164
star
7

qtci

Collection of scripts to build Qt application in command line environment
Shell
160
star
8

qsyncable

A solution of nested Json List Model
C++
112
star
9

androidnative.pri

Calling Android functions from Qt without using JNI
Java
101
star
10

nactor

Node.js actor model framework for game
JavaScript
73
star
11

testable

QT/QML Test Runner and Utilities
C++
55
star
12

quickfuture

Using QFuture in QML
C++
51
star
13

fontawesome.pri

Using FontAwesome in QML
QML
51
star
14

quickcross

QML Cross Platform Utility Library
C++
49
star
15

dquest

DQuest - The C++ ORM (Object-relational mapping) for Qt framework.
C++
41
star
16

qtshell

Manipulate files by a shell command style API
C++
31
star
17

qredux

Redux for QML
JavaScript
25
star
18

qtandroidexamplecode

Example code of Qt for Android
QMake
19
star
19

sketchqml

Export to a QML in SketchApp
JavaScript
19
star
20

biginteger

QML BigInteger library
C++
18
star
21

underline

A C++ utility library provides useful functional programming helpers like lodash.js
C++
18
star
22

joplin-plugin-dddot

A Joplin plugin to provide a set of tools like recent notes, shortcuts, scratchpad, and .... in a single sidebar.
TypeScript
17
star
23

ipylivebash

Run shell script in Jupyter with live output
TypeScript
11
star
24

memoinjo

Stick memo on any website
JavaScript
10
star
25

viewstack.pri

ViewStack.pri - A stateless StackView
QML
9
star
26

tinyboy

Tinyboy - A 3D printer designed for education
CSS
8
star
27

quickjsm

A QML Port of Javascript State Machine Library
JavaScript
8
star
28

dualless

Dualless is a poor man's dual monitor solution , a extension for Chrome.
JavaScript
8
star
29

quickflux-project-template

Project template using QuickFlux with unit tests
C++
7
star
30

material2

Light Weight Material Design Components based on QQC2
QML
7
star
31

junkcode

Junkcode for demonstration
QML
7
star
32

qpm-qt-creator-project-template

Qt Creator Project Templates with qpm
C++
6
star
33

hotloader.pri

Hot Reload QML Files
C++
6
star
34

testrunner

Qt Test Runner - A tiny tool to execute multiple QTestLib application and combine the testing result into a summary report.
C++
4
star
35

jupyter-for-devops-demo

A demo project to show how to use Jupyter for DevOps
Jupyter Notebook
4
star
36

joplin-garden-worker

Export notes from Joplin to build a digital garden website
JavaScript
4
star
37

gaescripts

A collection of scripts for GAE application maintenance
Python
3
star
38

qtsdkdocimg

Collection of QtSDK Docker Image Build Scripts
Shell
3
star
39

linne-analyzer

Python
3
star
40

kifier

The missing tool to turn your Web 2.0 application into Wiki
JavaScript
3
star
41

openstandkit

Open Design Portable Standing Desk
3
star
42

qml-rebase-source

A script to update the source attributes within a QML file
JavaScript
2
star
43

snapcat

AngelHack Project
Python
2
star
44

bnloadingpromise

Angular Loading Promise
JavaScript
2
star
45

qtbugstatus

Qt Bug Status Tracker
JavaScript
2
star
46

joplin-plugin-tag-links

Insert tag links to Joplin note
TypeScript
2
star
47

moblin-image-creator.jaunty

Moblin Image Creator for Jaunty
Python
2
star
48

asyncapi-live-reload-demo

Edit asyncapi.yml then generate and reload the HTML doc automatically
2
star
49

sparkqml-website

CSS
1
star
50

sparkqml-builder

Shell
1
star
51

blockwork

A Project in EOS Hackathon
JavaScript
1
star
52

react-redux-webpack-mocha-starter-kit

A starter project for React Redux
JavaScript
1
star
53

l

App Link to Universal Web Link
1
star