• Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created about 10 years ago
  • Updated 10 months ago

Reviews

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

Repository Details

Apply CSS style sheets to QML applications

Aqt StyleSheets

StylesSheets is a library for Qt/QML that allows you to apply CSS stylesheets to QML applications.

A singleton StyleEngine reads and parses a CSS file. QML components in your application can use the StyleSet attached object to request style properties. In doing so, the classname of the requesting object, its position in the component hierarchy, and its StyleSet.name info are used to build a selector path that is searched for in the CSS.

Decoupling application visual style from QML code allows designers and developers freedom to change the visual appearance of an application without breaking functionality, and allows for changing many similar QML components with fewer lines of code through selectors that apply across many components.

Requirements

Dependencies:

  • Qt (>= 5.3)
  • Boost (>= 1.54)
  • CMake (>= 2.8.12)

Mac:

  • Xcode v5.1 or higher

Windows:

  • Visual Studio 2015

Build and Test

  mkdir build
  cd build
  cmake ..
  cmake --build . --config Release
  cmake --build . --config Release --target install

The resulting plugin is then found inside build/lib/qml

The unit tests can be executed with ctest:

  ctest -V -C Release

You might set the following variables:

  • Boost_INCLUDE_DIR to the folder, where Boost headers are found

In case the CMake files shipped with Qt are not found, set the CMAKE_PREFIX_PATH to the Qt installation prefix. See the Qt5 CMake manual for more.

Example:

  cmake .. -DCMAKE_PREFIX_PATH=~/Qt/Qt5.3.1/clang_64 \
           -DBoost_INCLUDE_DIR=/opt/local/include/

Examples

In the examples folder there's an example app, showing how to use some of the feature of the StylePlugin. You can run the app with:

  qmlscene -I build/lib/qml examples/TestApp.qml

While qmlscene is running you can change examples/style.css and watch the application update.

Benchmarks

In the benchmarks folder there are benchmarks that can be run manually with:

qmltestrunner -import build/lib/qml -input benchmarks/benchmark_*.qml

Maintainers

License

Aqt StyleSheets is distributed under the MIT license (see LICENSE).

CI Status

Master: Build status Build Status

More Repositories

1

link

Ableton Link
C++
1,075
star
2

push-interface

The Ableton Push 2 MIDI and display interface manual.
641
star
3

m4l-connection-kit

Max for Live Connection Kit
C++
491
star
4

atria

A toolkit for modern C++ development
C++
436
star
5

maxdevtools

Python
255
star
6

LinkKit

iOS SDK for Ableton Link, a new technology that synchronizes musical beat, tempo, and phase across multiple applications running on one or more devices.
Objective-C++
150
star
7

push2-display-with-juce

C++
145
star
8

AudioPerfLab

An app for exploring real-time audio performance on iPhone and iPad.
C++
132
star
9

aqt-cassowary

Use the Cassowary constraint solver in QML applications
QML
54
star
10

ableton.github.io

Ableton's GitHub.io website
Sass
46
star
11

go-travis

Go library for accessing the Travis CI API
Go
33
star
12

python-pipeline-utils

Jenkins shared pipeline library for Python-related utilities
Groovy
25
star
13

groovylint

A CodeNarc wrapper for linting Groovy files
Python
19
star
14

windows-openssh

Ansible role to install Openssh on a Windows host
10
star
15

ansible-role-nix

Ansible role to install Nix
Jinja
10
star
16

ansible-role-jenkins-jcasc

Ansible role for installing Jenkins with JCasC
Jinja
4
star
17

ansible-role-prometheus-node-exporter

Ansible role to install Prometheus' node_exporter application
Jinja
4
star
18

postgres-pipeline-utils

Jenkins shared pipeline library to run Postgres in a Docker container
Groovy
2
star
19

ansible-role-sccache

Ansible role to install sccache
Jinja
1
star
20

ansible-role-jenkins-swarm-client

Ansible role to install Jenkins Swarm Client
Jinja
1
star
21

ansible-role-rustup-init

Ansible role to install rustup-init
Jinja
1
star
22

ansible-role-clang

Ansible role to install clang
Jinja
1
star