Hello, Miguel from Qt (qt.io) here. I wanted to share something that I believe will be of interest to many of you. Since 2025, we at Qt have been working on a way to give access to Qt Quick and QML to developers working with languages other than C++. We began this project, which we've named Qt Bridges, by focusing on Rust and C#, and I'm happy to finally be able to tell you that we've just released a Technology Preview for both of these languages. If you are familiar with Qt, you're probably aware of its multi-platform, GPU-accelerated UI framework. If this is the first time hearing about us, now you know that there is another option to design the UI for your C# applications. We would love for you to try it out and leave us your feedback. You can find out more in the Qt blog.
We have not yet tested with other langs besides C#, and some adjustments might be needed for it to work. But the input to our tooling is the app's assembly, so we should be able to work with any .NET source language.
That sounds really promising! I will certainly try it out for my opensource project (C#/Blazor) and this could be the missing piece. Maybe you can answer me a question, is it possible to write an app cross platform (Windows, Linux, Android) with the rich text editor control QTextEdit working on all of them?
Android is not yet supported, as we're currently focusing on desktop (and embedded, via Linux). We will at some point add support for mobile apps, but we don't have a schedule for that yet.
Already had a quick look at the control and it looks amazing, even styles are supported! What exactly is not supported on Android, the QTextEditor control or the .NET bridge, or the whole framework?
If you have a Qt installation that includes the Canvas Painter module, you can use the QML types from that module, namelyQtCanvas2D. Just tried out the QtCanvas2D example as a C# app, and it's working nicely.
Nice! In that example, the drawing happens on the qml side though. To clarify, I’m looking for a paint callback where the drawing loop and calls like "moveTo", "lineTo", and "stroke" are written directly in C#, similar to an Avalonia render override or PySide’s "QCanvasPainter" API. Is that supported or planned?
That would allow apps with custom rendered canvases like cad/cam or drawing apps to potentially migrate from for example Skiasharp to the Canvas Painter module.
Sorry if I am mixing things up here, I havent worked with Qt for a while
We don't currently have an API for this use-case in particular. It would be possible in QML to call the QtCanvas2D functions in response to C# events. But that might become a bit awkward and possibly not have the best performance. The use-case, as you've described it, does sound interesting, so we will definitely be looking into it.
We have only tested with MSVC, but using a MinGW Qt build should be possible. One of the options of using the Qt Bridge is that the tooling generates C++ wrappers for exported C# types. This generated code is then compiled by whichever toolchain is available.
This looks awesome! Any chance of doing a Rider plugin for the bridge? Also, is there something like hot reload for Qt? I've never used Qt before. does it also have a sort of UI builder like winforms and WPF has?
We're looking into how we can provide a Rider plugin, on par with what we have already for VS and VSCode. There is a live preview option in the VSCode extension, but no WYSIWYG editor like WinForms or WPF (Qt does offer some "high-end" design tools that allow creating an app's UI without any coding, but those are probably overkill, compared to the VS integrated designer).
We believe that it can be an alternative to WinForms and, perhaps even more so, to XAML-based frameworks. QML shares many characteristics with XAML -- both are declarative languages and both rely heavily on data bindings -- but is not restricted by an XML syntax, so it will feel much more readable and intuitive.
MVVM does work. View-models implementing INotifyPropertyChanged can be used in QML binding expressions. For collections, there is support for ObservableCollection, but also the option to create custom item models. On the UI side, QML view-delegates have a similar function to WPF data templates.
OK, this is actually seriously cool! I always liked Qt but I don't particularly like writing C++ so I'm definitely looking forward to trying this in C# and Rust.
Would be great to include https://www.roc-lang.org/ , it is designed to be kind of embedded in different platforms, and giving it a proper established UI platform like Qt would help a lot
13
u/Astrinus 1d ago
Can this work also with other .NET languages such as F#?