Cannot find StackView.qml

  • Hi All,

    I'm trying to launch my application on RPi3 - for this I have cross compiled Qt 5.9.1 and after that compiled separately QtQuick.Controls module.

    For some reason every time I launch my application I'm getting following output which ends with message indicating that StackView.qml was't found:

    root@raspberrypi:/opt# ./HomeScreenTest
    QML debugging is enabled. Only use this in a safe environment.
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    QQmlApplicationEngine failed to load component
    qrc:/qml/main.qml:44 Type MyStackView unavailable
    qrc:/qml/components/MyStackView.qml:8 Type StackView unavailable
    qrc:/QtQuick/Controls/StackView.qml:-1 No such file or directory

    I have built QtQuick.Controls module separately and added it to qml older of Qt Version on Raspberry device:

    root@raspberrypi:/usr/local/qt5/qml/QtQuick/Controls# ls
    ApplicationWindow.qmlc  GroupBox.qmlc          Private         SpinBox.qmlc              Styles                TextArea.qmlc
    BusyIndicator.qmlc      Label.qmlc             ProgressBar.qmlc  SplitView.qmlc          Switch.qmlc           TextField.qmlc
    Button.qmlc     qmldir            StackViewDelegate.qmlc    TableViewColumn.qmlc  ToolBar.qmlc
    Calendar.qmlc           MenuBar.qmlc           RadioButton.qmlc  StackView.qmlc          TableView.qmlc        ToolButton.qmlc
    CheckBox.qmlc           Menu.qmlc              ScrollView.qmlc   StackViewTransition.qmlc  Tab.qmlc            TreeView.qmlc
    ComboBox.qmlc           plugins.qmltypes       Slider.qmlc       StatusBar.qmlc          TabView.qmlc


    import QtQuick 2.0
    import QtQuick.Controls 1.4
    import net.myplugin.dima 1.0
    import "qrc:/qml/Paths.js" as Paths
    StackView {
        id: root
        delegate: StackViewDelegate {
            // remove all default animations
        function pushStack(screenIndex, clearStack) {
            if (screenIndex===ScreenNames.SCREEN_HOME) {
                clearStack = false;     // skip this, as not needed any more
            if (clearStack) {
                console.log("clear stack")
                root.pop({item: root.get(0)});      // always keep root in stack
            root.push({item: resolveScreenUrl(screenIndex), immediate:true, properties: {stackView: root, screenIndex: screenIndex, name: ScreenNames.resolveScreenName(screenIndex)}});
        function resolveScreenUrl(screenIndex) {
            return Paths.screen(ScreenNames.resolveScreenUrl(screenIndex) + ".qml");

    Does anyone have any idea what could cause such behavior or what else I can check for additional information?

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.