There is zero documentation on FlowView and FlowItem
-
Hi,
As the title says, there is zero documentation about FlowView and FlowItem QML components, I searched all over the Qt documentation for version 6.5 LTS and nothing, I have no clue how to use them, I can't even set an item's background color.
Does anyone know how they work? or even better, a sample project? Not even samples or tutorial provided by Qt.
I created a project in Qt Design Studio that uses the flow views and flow items (flow mode), but now that I exported the project to CMake to use it in Qt Creator, it shows a whole bunch of errors regarding the FlowView and FlowItem components created in Design Studio, which makes my design studio design completely useless to create an application.
There ie zero documentation regarding exporting a flow based application from design studio to creator, and how to handle in the code side the whole flow components.EDIT: Added an error in Qt Creator that doesn't recognize the Flow modules
-
Never heard of FlowView, are you sure it's part of Qt? Even searching through Qt source code I can't find it.
Don't worry about Qt Creator not recognising some custom QML components, it happens all the time. If you compile and run the app it will work (if that component really exists).
-
@sierdzio yeah this comes as part of Qt Design Studio, it's inside it's distribution folder and when you create a project even in Qt Creator with the option to have the project compatible with Qt Design Studio, you will notice the generated qml files come with FlowView.
-
@JoeCFD thanks for the reply Joe, already created a full project using flow views and items, problem is that if you export it to load it to Qt Creator to actually implement business logic, you will see a ton of errors like the one I stated above, and there is zero documentation on the FlowView module, and is not even part of the Qt distribution, effectively making your design studo project useless for actual app creation.
-
@raulgd said in There is zero documentation on FlowView and FlowItem:
effectively making your design studo project useless for actual app creation.
As mentioned, the code probably compiles and runs, it's just Qt Creator which does not "get it" and displays some errors in the editor. This is happening on all QML projects I remember :-( Sucks but you get used to it after some time.
There are some things which can help, by the way:
- if you are registering C++ types for QML, you can annotate them like this:
// @uri YourUriName
- in qmake / cmake you can add some instructions to tell Qt Creator where your QML code is so it will scan it: define
QML2_IMPORT_PATH
and point it to your QML folder
- if you are registering C++ types for QML, you can annotate them like this:
-
@sierdzio it doesn't build as it can't find the flow module, I haven't figured out a way to copy the module from the design studio folder into my qt creator folder so it doesn't break.
I'll mark the topic as solved as it's not something I've been able to fix so far by myself, I raised a support ticket in my customer portal, and let's see if it's addressed later on. But at least for now what I'm doing is just not using the flows stuff, I'm doing "normal" qml files with the base Item component instead.
Thanks to everyone who contributed on this topic :)
-
-
FlowView is part of qt-labs/qtquickdesigner-components - see https://doc.qt.io/qtdesignstudio/quick-converting-ui-projects.html#adding-qt-quick-designer-components-to-qt-installations to install it in other Qt versions.