GithubHelp home page GithubHelp logo

classicvalues / aqt-stylesheets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ableton/aqt-stylesheets

1.0 0.0 0.0 890 KB

Apply CSS style sheets to QML applications

License: Other

CMake 3.94% QML 14.15% CSS 0.64% JavaScript 0.36% C++ 80.91%

aqt-stylesheets's Introduction

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

aqt-stylesheets's People

Contributors

ala-ableton avatar arximboldi avatar cah-ableton avatar csk-ableton avatar fmeinicke avatar gck-ableton avatar hvellyr avatar jab-ableton avatar mak-ableton avatar mli-ableton avatar mst-ableton avatar nil-ableton avatar nre-ableton avatar nsh-ableton avatar ske-ableton avatar toh-ableton avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.