While trying to use qmlrs, I encountered this issue:
~/rustqml/qmlrs$ cargo run --example factorial
Compiling qmlrs v0.0.1 (file:///home/dally/rustqml/qmlrs)
Running target/debug/examples/factorial
QQmlApplicationEngine failed to load component
file:///home/dally/rustqml/qmlrs/examples/factorial_ui.qml:2 module "QtQuick.Controls" is not installed
file:///home/dally/rustqml/qmlrs/examples/factorial_ui.qml:3 module "QtQuick.Layouts" is not installed
file:///home/dally/rustqml/qmlrs/examples/factorial_ui.qml:2 module "QtQuick.Controls" is not installed
file:///home/dally/rustqml/qmlrs/examples/factorial_ui.qml:3 module "QtQuick.Layouts" is not installed
After searching, I installed libqt5qml-quickcontrols
. I now get errors about requiring version 1.2:
~/rustqml/qmlrs$ cargo run --example factorial
Running target/debug/examples/factorial
QQmlApplicationEngine failed to load component
file:///home/dally/rustqml/qmlrs/examples/factorial_ui.qml:2 module "QtQuick.Controls" version 1.2 is not installed
So I figured out in the qmlrs project find the file called
factorial_ui.qml
and change the line where it says: change the version of QtQuick.Controls:import QtQuick.Controls 1.1
(in my case was 1.1 which solved my version)Otherwise check out: https://github.com/cyndis/qmlrs/blob/master/.travis.yml
to install the requirements they are located in the project;
I know my solution is quick hack to make it work; but hey I'm on the ground running with GUIs in Rust :)