Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Design Studio Flow Mode not working!



  • I created the most bare-bones FlowView following the examples I found. However, I get the following errors when I try to run the program or open the live preview:

    file:///C:/Users/Me/Documents/TheProject/MyFile.ui.qml:5 Type FlowView unavailable
    file:///C:/Qt/Tools/QtDesignStudio/qt5_design_studio_reduced_version/qml/FlowView/FlowView.qml:45 Type FlowWildcard unavailable
    file:///C:/Qt/Tools/QtDesignStudio/qt5_design_studio_reduced_version/qml/FlowView/FlowWildcard.qml:36 Type FlowItem unavailable
    file:///C:/Qt/Tools/QtDesignStudio/qt5_design_studio_reduced_version/qml/FlowView/FlowItem.qml:43 Invalid alias reference. Unable to find id "loader"
    

    When I investigate FlowItem.qml, there are two: one at C:\Qt\Tools\QtDesignStudio\qt5_design_studio_reduced_version\qml\FlowView\FlowItem.qml and one at C:\Qt\Tools\QtDesignStudio\qt5_design_studio_reduced_version\qml\FlowView\+DesignMode\FlowItem.qml. The former seems to be the one that is found by the qml compiler and it indeed does not have a Loader child with id "loader". However, the latter file does have a Loader with id "loader".

    Here is the FlowView qml that was created by the designer. I created a FlowItem called HomeScreenFlow that has a simple component in it.

    import QtQuick 2.12
    import TheProject 1.0
    import FlowView 1.0
    
    FlowView {
        id: flowView
        width: Constants.width
        height: Constants.height
    
        defaultTransition: FlowTransition {
            id: defaultTransition
        }
    
        EventListSimulator {
            id: eventListSimulator
            active: false
        }
    
        HomeScreenFlow {
            id: homeScreenFlow
        }
    }
    

    Am I missing a step? Do I need to do something extra to assign the component within the HomeScreenFlow FlowItem? Within Designer Studio, I see a property for HomeScreenFlow called "Loader Source", but it doesn't seem to do anything. Can anyone shed some light for me on what I'm doing wrong?

    Thanks!

    I'm on:
    Qt Design Studio 2.0.0
    Based on Qt 5.15.2 (MSVC 2019, 64 bit)



  • Hello!

    Could you add a link to the example that you followed if it is publicly available online?

    Did you follow the instructions in the Qt Design Studio Manual: https://doc.qt.io/qtdesignstudio/studio-app-flows.html#adding-flow-items

    Specifically, it is important to use the wizard template to create the flow view and all flow items: File > New File or Project > Files and Classes > Qt Quick Files > Flow Item

    Dragging and dropping a Flow Item from the Library to your project is only supported for the purpose of adding states to a flow item.


Log in to reply