This is the second pass at a Rive Qt Quick Plugin.
It plays Rive's .riv files in Qt Quick by using the official Rive runtime and
renderer. The project is called RiveQtQuickPlugin2, but the QML import stays
RiveQtQuick.
The target here is to build a highperformance plugin, utilizing the official implementation in a qtquickscene. All Rive drawing share a context, meaning they render extremly fast.
import RiveQtQuick
RiveItem {
source: "qrc:/animations/example.riv"
}
This is a table view with 100x100 buttons. Each button has a RiveItem on it. You find the code in the examples.
buttons_with_rive_icons.mp4
- built for Qt
6.6.0and newer - uses the official Rive runtime
- Qt Quick / RHI based rendering
- a couple of small example apps to test things quickly
- shared context rendering between all rive elements
- caching of riv files so the plugin does not load them more than once
- Android Support
- Vulkan
- Direct3d11 and 12
-> no opengl support
-> no metal support
-> no software render support
Right now the project is mainly exercised on Windows. Release builds are the ones that really matter for performance, debug builds are okay, but can be slow on complex animations.
src/RiveQtQuickis the plugin itselfexampleshas the small demo appstestshas unit and QML coveragescriptshas the helper scripts
riveqtquick_minimalis the smallest viewerriveqtquick_marketplace_demois the marketplace browser / inspector demo loading elements live from the official rive marketplaceriveqtquick_icon_gridshows a big grid of Qt Quick buttons with live Rive icons inside
The repo expects the 3rdparty/ folder to be present.
If you want to fetch or refresh it:
python .\scripts\bootstrap.py
Typical Windows build with MSVC 2022:
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH=.....<qtpath>.....
cmake --build build --config Release --target RiveQtQuick
If you want the demo apps too:
cmake --build build --config Release --target riveqtquick_minimal
cmake --build build --config Release --target riveqtquick_marketplace_demo
cmake --build build --config Release --target riveqtquick_icon_grid
ctest --test-dir build -C Debug --output-on-failure
MIT