In my understanding this means that the style only works by using the Qt backend. As there is no way (I know of) to use the Qt backend without the style these seem interdependent.
Yes. See also Qt Backend | Slint Docs
The Qt backend uses the Qt
library to interact with the windowing system, for rendering, as well as widget style for a native look and feel.
And https://github.com/slint-ui/slint/blob/master/docs/install_qt.md
Do I need Qt to use Slint?
Short answer: No. Only if you want to use the Qt backend used for the native style.
Slint has two backends: GL and Qt. The GL backend uses the femtovg and winit crate for the rendering. The Qt backend uses Qt. In addition, the Qt backend provide the implementation for the native widget from the native style. Qt is only needed if you want native looking widgets. Otherwise, another style will be used for widget, which does not look native. In the future, we plan to have native backend using the native API, which will allow native widgets without using Qt.
The Slint styles are used for the winit backend while the Qt backend uses QStyle. See also https://github.com/slint-ui/slint/blob/master/internal/backends/qt/qt_widgets.rs
This module contains all the native Qt widget implementation that forwards to QStyle.
NOTE: When Qt is installed on the system, the qt style becomes available, using Qt’s QStyle to achieve native looking widgets.
I think this is outdated.
I don’t think so after looking at the docs, the code and the CI/CD.
When setting the style to qt, the code won`t compile
I suggest to create a bug report about that in there issue tracker and attach as much informations as possible. This error:
error[E0433]: cannot find `NativePalette` in `sp`
error[E0433]: cannot find `NativeScrollView` in `sp`
Sounds like your Slint was compiled without support for Qt since NativePalette is defined in https://github.com/slint-ui/slint/blob/master/internal/backends/qt/qt_widgets.rs
My wild guess would be that the with Slint generated code was generated with a Slint version which had the Qt backend enabled but now you try to use that generated code in a project with a Slint that not has the Qt backend enabled. I can also imagine, but didn’t check the code, that the generator actually allows to generate code for backends that are not enabled since the code generator not needs the backend but when you like to use the code you will need the backend. Such a setup would make sense for distributed work.