-
Hi, I'm trying to understand how Qt is pulled in through Slint and how this might affect applications directly depending on Qt too. Though on Linux I could manage to get it running fine, I have some concerns about deployment (and also experienced already a deployment problem on macOS which might be related). I'm having a C++ application heavily depending on Qt and want to implement the UI with Slint while the C++ business logic still depends on Qt (QString, QThread, QNetworkManager, QEverything). So basically the application now depends on Qt directly and indirectly. But I don't understand yet where Slint gets Qt from. Is it shipped with Cargo? What version does it use? I'm not experienced with Rust yet so at a quick look I didn't see any Qt dependency of So, is Qt shipped by Slint separately or does it access the system installed Qt?
I think if the app and Slint both access the same Qt, everything is good and deployment should not cause issues. Could you maybe give a hint how the Qt dependency is pulled in? If it uses the system installed Qt, what minimum version is required? And could you confirm the official Slint binaries do not contain the Qt backend? I couldn't find any documentation about this. Due to the dependency to Qt, we can't use any other Slint backend. We require the Qt event loop to be running and as far as I understand, that's only possible by using the Qt backend. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ideally it should use the same Qt. Anything else is asking for troubles. Lines 210 to 226 in 2c9e796 (That code sets the QMAKE env variable to build the rust integration, so it will use that version of Qt)
The windows and mac one are compiled only with the winit backend.
Right, I would recommend using the Qt backend in your case. |
Beta Was this translation helpful? Give feedback.
Ideally it should use the same Qt. Anything else is asking for troubles.
When compiled using cmake, this code is used to find Qt:
slint/api/cpp/CMakeLists.txt
Lines 210 to 226 in 2c9e796