-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature?: Direct support for Qt-Designer (*.ui) files #5491
Comments
Awsome. I think this tool could be usefull to migrate dialogs or some widgets from Qt widgets to Slint. I'm not sure it should be integrated directly into slint. It should probably be a tool can can be run once on your files. I guess it could be a different build-dependency so the build.rs would look like: // (this is pseudo code, naming need to be thought out and paths need to be relative to OUT_DIR and such)
qt_ui_to_slint::conver_ui_file("foo.ui", "foo.slint");
slint_build::compile("foo.slint"); And so this wouldn't be part of Slint itself but just another crate Another solution i'm not suggesting is if you could do import { Foo } from "foo.ui"; but that means we need to add support into Slint and keep compatibility. Anyway, we could have that in our repository in the |
Wow… actually I didn't think about importing a component directly from a "foo.ui". No question this would be really a powerful feature. Very ambitioned though (put in a single custom widget and… ⚡). Maybe with active support from Qt/KDE. Right now it's a dream, let's keep it this way (or at least mark this highly experimental 😸)… The project repository lives currently on GitLab -> qt-ui-conv. When moving this into tools maybe I should start thinking about splitting out features (qt_ui_conv_slint, …qml, …cli, …gui?, …). |
I also think this tool would be very useful when migrating from Qt Widgets to Slint. However, I think integrating it into |
@WilstonOreo The source is linked above if you like to understand the model. When you compile it you can run with |
Background
Few weeks ago I started wirting a little serializer fun tool that converts
*.ui
files into*.slint
and*.qml
(only latest Qt6) formats. Currently this is just for me to learn about Rust tooling. However the tool produces quite usable results in current state and I make good progress. The crate depends onquick_xml
andserde
to create the model(s) andyaserde
for writing the output*.slint
file (because quick_xml can only serialize into XML formats; not Slint).Restrictions
Make it a Slint feature maybe?
Assuming Slint would be able to read those Qt-Designer files (like a "JIT") and render them. Do you think this will benefit both projects Qt and Slint? I think in best case it might even make Rust more interesting for Qt/C++ developers, because it just feels like Qt and people wouldn't even have to learn a new language (when used with C++ bindings).
The text was updated successfully, but these errors were encountered: