The parent project, NodeGUI, has some Windows screenshots and examples – I’m not familiar enough with Fluent or WinUI, but basically the UI runtime is Qt5, so integrating it into genuine Windows apps is out of scope (but may well be possible with the right expertise). I assume it would involve some kind of Qt-hosting view. I’m unsure whether Qt5 can host Windows UI components.
WinUI 3 improves the ability to embed fluent UI “xaml islands” in Win32 apps (like Qt processes) but it’s extremely convoluted and requires a lot of boilerplate (that I believe Qt could theoretically abstract over being at a high-enough level).
> I’m unsure whether Qt5 can host Windows UI components.
yep, basically you have to do :
auto window = QWindow::fromWinId(reinterpret_cast(/* HWND, NSView, X11 buffer, Wayland surface... /*));
auto widget = QWidget::createWindowContainer(window);
and then you can use the widget like any other Qt widget, put it in a layout, etc... (of course caveats may apply when you start doing transparency or other fun things).
No plans, but what kind of integration would you have in mind?
I actually happen to be struggling to get React Native in the NativeScript runtime right now – running it in the Node.js runtime would be if anything even more challenging. But there are other ways to make the two work together.
I’ve always been wondering what nativescript really was about, and how it compared to react native and other platforms (and also, why do i barely read about it on HN or elsewhere, as it seems to offer a cross-platform dev environment).
The project’s webpage has way too many tech listed to be of any help, and the video mentions a framework, an IDE, a debugging environment... Do you have a good link where i could get a better understanding of the tech, and how it’s used in real world project ?
There are other projects like this - But what would really set it apart would be mobile (iOS and Android) support. Can we do anything to support that happening?
Qt does have an implementation that targets mobile. I don’t know how the licensing works, but in theory there should be a way to rely on Qt for mobile to extend support to iOS and Android. Way out of my own expertise, though!
Qt for Android and Qt for iOS can be used under the LGPL[1]. The issue for iOS, though, is that Apple's App Store violates the terms of the LGPL. To comply with the LGPL, you must make available to iOS users versions of your app that can be linked against user-provided Qt libraries.
"In case of dynamic linking, it is possible, but not mandatory, to keep application source code proprietary as long as it is “work that uses the library” – typically achieved via dynamic linking of the library."
Also, Chromium's Blink renderer has a lot of LGPLv2 source files that date back to the KDE KHTML days[1] and as you can see by the numerous proprietary applications that use Electron and Chromium Embedded Framework, that this doesn't hinder companies from using LGPL libraries as long as they abide by the license.
However, one thing to note: the OSS version of Qt uses the LGPLv3 license, which has additional restrictions (like the "Anti-Tivoization" clause) which make it incompatible with the iOS AppStore thus forcing you to use the commercial version of Qt in those situations. Not sure about the Mac and Windows 10 app stores, I am curious if anyone knows/has experience with LGPLv3 and those stores? [1] https://github.com/chromium/chromium/search?q=%22kde.org%22
It’s looking good! One really common usecase Id suggest emphasizing (it looks supported) is the systray UI. I’ve had a lot of cases where my program is mostly just a background nodejs service and the simple task of adding a dock UI required electron. A great thing to have solved!
Is there a story for interop with other languages? I understand the UI probably has to be defined in JS, but what about transparently making request to a local server written in another language (bonus point if it can somehow be made less observable than that, i.e. not consuming a localhost port).
The NodeJS NAPI support binary modules written in any language that can build dynamic libraries against the C FFI. There's still a little overhead marshaling between Javascript and the guest language but it's small compared to the overhead of HTTP or WASM.
I might go a little offtopic here. Any plans to integrate https://github.com/c-smile/quickjspp. That way you can target mobile platforms too. QT supports mobiles well
As for desktop only this is great. Great work. Many people are commenting on NodeGUI only. They have forgotten to mention how Svelte also contribytes to saving memory footprint and cpu cycles over other frameworks with a much easier way to write apps. Add a small learning curve to that.
1. Is there any way to load a UI file made with designer-qt5, perhaps with example code?
2. Thank you for backing up your claims about a native implementation by actually providing one, unlike your competitors Tauri and Wx who constantly lie about the topic.
I'm really happy to have found this at I'm in the early stages of building an app. My plan is to release a web only version first and then desktop clients later depending on demand.
So, my question is, how much work is there to convert a web app built with Svelte to a Svelte NodeGUI app? Will most things just work, or should I expect to have to rebuild a lot of functionality?
I'm really happy to have found this at I'm in the early stages of building an app. My plan is to release a web only version first and then desktop clients later depending on demand.
So, my question is, how much work is there to convert a web app built with Svelte to a Svelte NodeGUI app? Will most things just work, or should I expect to have to rebuild a lot of functionality? Second, my app will make use of WebGL (or possibly WebGPU in the future) and have done wasm components. Do these work with NodeGUI?
This is confusing for me. I think such a framework is either 'platform agnostic' OR 'native'. Maybe the API is platform agnostic and the rendering is done natively?
That’s the case, yes – the UI runtime is Qt5 (which is rendered using low-level graphics APIs, so we class it as “native” – mostly in contrast to WebView-based UIs), and it’s the same API regardless of which platform you’re running on.
I saw Qt and immediately understood what you were trying to say, but for the record: That’s not what native means. Native means “uses the platform widgets and drawing/theming api” and Qt is not native: it actually draws its own widgets (for the most part with certain exceptions on certain platforms) that are drawn to mimic the system UI with subtle differences. If the system UI implementation suddenly changes (say with an OS release) the Qt UI wouldn’t magically change with it.
Is Qt considered native when you use KDE and not native when you use GNOME? Is Qt 3 considered not native when you use a KDE release that uses Qt 4 under the hood?
Real question, what do some people mean with native C++? Or stuff like react native? Seems like it just equals more performance / peels away an abstract layer.
Not necessarily. This expression probably refers to Qt's capability to use the subset of native widgets that are functionally equivalent across platforms. This blog post has some images of this feature in action: https://www.qt.io/blog/desktop-styling-with-qt-quick-control...
I think this is part of why many people stick with Electron instead of Qt in the first place. Nevertheless, a really cool idea. I will jump ship from Electron as soon as the first viable alternative emerges. However I haven't yet seen a wysiwyg text editing framework that can hold a candle to something like ProseMirror, so for my use case that might be a while.
I'm always a bit surprised there was the space for Electron to exist in the first place. Since most operating systems have widget toolkits that have browsers effectively embedded into them.
What I would have liked to have seen instead of Electron would have been a shim API that abstracted OSX/iOS/WinForms/QT webviews, and for those webviews to have a working API that would allow DOM manipulation, and allowed native sub-views to be inserted as block elements.
You had to use JavaScript or VBScript but all the safety rails are off, this is pre-sand boxing, what do you mean websites might be malicious why would someone make one like that... you could do crazy things, and fully leverage windows APIs directly without much effort via VBScript, I once used the winforms(?) APIs to introspect field labels and names to automate the driving of multiple desktop apps from a crazy jquery and VBScript monstrosity. Made me twice as efficient at that job though so it was awesome. You could control child iframes and pop up windows (remember these?) and VBScript let you shoehorn quite a bit of native UI type stuff whenever it was going to be easier than building something with simple forms, JavaScript, tables and frames. If you got really fancy you would Base64 some absurd binary into your app and unpack it on the fly with VBScript then call it from a temp directory in order to drive things like interacting with network services that didn’t have any sort of thing you could work with via HTML JavaScript and XMlHTTRequest (this was the very dawn of Ajax)
One reason is that for a very long time, if you created a native WebView on Windows, you would get an IE7-compatible browser, even if the user had installed a much newer version of IE. There were a couple of tricks you could use to get the user's actual browser version, which I described some time ago here:
http://forums.apricitysoftware.com/t/why-is-markdownpad-spaw... In any case you were still dependent on IE10/11 at the best, and certainly nothing as modern as the old Edge, much less the Chromium-based Edge. And on older Windows versions it completely depended on whether the user had upgraded IE. You could write HTML/CSS/JS that was portable between IE10/11 and other native browsers, just as we all did in actual websites. I did this for Mac/Windows in the past and it worked, but it was fairly compelling for web developers to have a single browser version to target instead of the various incompatible native web views. The situation is a bit different now, where you can get an Chromium Edge view on Windows 10 and a Safari view on Mac, but what do you get on Linux? I don't know.
Comments (271) 25 threads
Earlier commentsEdit: NodeGUI here: https://github.com/nodegui/nodegui
yep, basically you have to do :
and then you can use the widget like any other Qt widget, put it in a layout, etc... (of course caveats may apply when you start doing transparency or other fun things).I actually happen to be struggling to get React Native in the NativeScript runtime right now – running it in the Node.js runtime would be if anything even more challenging. But there are other ways to make the two work together.
The project’s webpage has way too many tech listed to be of any help, and the video mentions a framework, an IDE, a debugging environment...
Do you have a good link where i could get a better understanding of the tech, and how it’s used in real world project ?
If you use the Qt commercial license for either, then you don't need to worry about your app conforming to the LGPL.
[1] https://wiki.qt.io/Licensing-talk-about-mobile-platforms
Atul is licensing NodeGUI as MIT, so I’m licensing Svelte NodeGUI as MIT accordingly.
"In case of dynamic linking, it is possible, but not mandatory, to keep application source code proprietary as long as it is “work that uses the library” – typically achieved via dynamic linking of the library."
However, one thing to note: the OSS version of Qt uses the LGPLv3 license, which has additional restrictions (like the "Anti-Tivoization" clause) which make it incompatible with the iOS AppStore thus forcing you to use the commercial version of Qt in those situations. Not sure about the Mac and Windows 10 app stores, I am curious if anyone knows/has experience with LGPLv3 and those stores?
[1] https://github.com/chromium/chromium/search?q=%22kde.org%22
Continue this thread — 2 replies
As for desktop only this is great. Great work. Many people are commenting on NodeGUI only. They have forgotten to mention how Svelte also contribytes to saving memory footprint and cpu cycles over other frameworks with a much easier way to write apps. Add a small learning curve to that.
2. Thank you for backing up your claims about a native implementation by actually providing one, unlike your competitors Tauri and Wx who constantly lie about the topic.
So, my question is, how much work is there to convert a web app built with Svelte to a Svelte NodeGUI app? Will most things just work, or should I expect to have to rebuild a lot of functionality?
So, my question is, how much work is there to convert a web app built with Svelte to a Svelte NodeGUI app? Will most things just work, or should I expect to have to rebuild a lot of functionality?
Second, my app will make use of WebGL (or possibly WebGPU in the future) and have done wasm components. Do these work with NodeGUI?
This is confusing for me. I think such a framework is either 'platform agnostic' OR 'native'. Maybe the API is platform agnostic and the rendering is done natively?
An example of native UI is libui or WxWidgets.
Continue this thread — 7 replies
Continue this thread — 2 replies
Continue this thread — 2 replies
What I would have liked to have seen instead of Electron would have been a shim API that abstracted OSX/iOS/WinForms/QT webviews, and for those webviews to have a working API that would allow DOM manipulation, and allowed native sub-views to be inserted as block elements.
You had to use JavaScript or VBScript but all the safety rails are off, this is pre-sand boxing, what do you mean websites might be malicious why would someone make one like that... you could do crazy things, and fully leverage windows APIs directly without much effort via VBScript, I once used the winforms(?) APIs to introspect field labels and names to automate the driving of multiple desktop apps from a crazy jquery and VBScript monstrosity. Made me twice as efficient at that job though so it was awesome.
You could control child iframes and pop up windows (remember these?) and VBScript let you shoehorn quite a bit of native UI type stuff whenever it was going to be easier than building something with simple forms, JavaScript, tables and frames. If you got really fancy you would Base64 some absurd binary into your app and unpack it on the fly with VBScript then call it from a temp directory in order to drive things like interacting with network services that didn’t have any sort of thing you could work with via HTML JavaScript and XMlHTTRequest (this was the very dawn of Ajax)
http://forums.apricitysoftware.com/t/why-is-markdownpad-spaw...
In any case you were still dependent on IE10/11 at the best, and certainly nothing as modern as the old Edge, much less the Chromium-based Edge. And on older Windows versions it completely depended on whether the user had upgraded IE.
You could write HTML/CSS/JS that was portable between IE10/11 and other native browsers, just as we all did in actual websites. I did this for Mac/Windows in the past and it worked, but it was fairly compelling for web developers to have a single browser version to target instead of the various incompatible native web views.
The situation is a bit different now, where you can get an Chromium Edge view on Windows 10 and a Safari view on Mac, but what do you get on Linux? I don't know.
All comments shown.
Couldn't load more comments. Check your connection and try again.