Fluid is a collection of cross-platform QtQuick components for building fluid and dynamic applications.
Qt >= 5.7.0 with at least the following modules is required:
First, if you want to include the Material Design icons used with the Icon
component, run:
./scripts/fetch_icons.sh
This will clone the Google repository holding the icons and copy the SVG icons into the icons
directory.
From the root of the repository, run:
mkdir build; cd build
cmake .. -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
make
make install # use sudo if necessary
On the cmake
line, you can specify additional configuration parameters:
-DCMAKE_INSTALL_PREFIX=/path/to/install
(for example,/opt/liri
or/usr
)-DCMAKE_BUILD_TYPE=<build_type>
, where<build_type>
is one of:- Debug: debug build
- Release: release build
- RelWithDebInfo: release build with debugging information
First, clone this repository.
Run the icon script located here:
./scripts/fetch_icons.sh
In your project file, include the fluid.pri file:
include(path/to/fluid.pri)
Then, in your main.cpp
file or wherever you set up a QQmlApplicationEngine
:
- add this include directive :
#include "iconthemeimageprovider.h"
- add the resources files to your
QQmlApplicationEngine
import paths :
engine.addImportPath(QStringLiteral("qrc:/"));
- register fluid's image providers to the engine :
engine.addImageProvider(QLatin1String("fluidicons"), new IconsImageProvider());
engine.addImageProvider(QLatin1String("fluidicontheme"), new IconThemeImageProvider());
- and after that you can load your qml file:
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
Licensed under the terms of the Mozilla Public License version 2.0.