3 ms·
This is not really accurate. Qt relies on a lower level windowing system (X Window, Wayland, Cocoa, win32 etc. etc.). Also worth noting that many creation-cent
by PaulDavisThe1st 7y ago
This is not really accurate. Qt relies on a lower level windowing system (X Window, Wayland, Cocoa, win32 etc. etc.).
Also worth noting that many creation-centric applications for the desktop (graphics, audio, video etc. etc.) don't look "native" even when they actually are. In one case (Logic Pro, from Apple), the "platform leading app from the platform creator" doesn't even look native!
- rattray 7y ago> Qt relies on a lower level windowing system That's true of QtWidgets, but not QML / Qt Quick (the newer tool), correct? (I found this hard to determine online).
- jcelerier 7y agoKinda - QML is a programming language, Qt Quick is an UI scene graph (with the main way to use it being through QML) which also "renders everything" and makes by default less effort than widgets to look like the OS. But : - QML can be used with other graphics stack - for instance Qt Widgets like with https://www.kdab.com/declarative-widgets/ https://www.kdab.com/declarative-widgets/ or alternatives to the official Qt Quick controls with https://github.com/uwerat/qskinny https://github.com/uwerat/qskinny or with completely custom rendering like here with NanoVG : https://github.com/QUItCoding/qnanopainter https://github.com/QUItCoding/qnanopainter - QtQuick Controls can be made to use the same style hints than the desktop with https://github.com/KDE/qqc2-desktop-style https://github.com/KDE/qqc2-desktop-style
- madeofpalk 7y agoWhat does “native” even mean? Put a <button/> in an HTML page and you get a platform-provided UI widget.
- PaulDavisThe1st 7y agoIt's not platform-provided in my experience, but browser provided. The result of <button/> when viewed in a browser on macOS has no relation to the Cocoa API in any meaningful sense.
- deleted 7y ago[deleted]
- madeofpalk 7y agoI'm pretty sure that when you render just a <button> in at least Safari, the browser will render a native Cocoa button control. If you set a CSS property like background colour or change the border, then it will "fall back" to a custom rendered control that isn't from the OS UI. I did a small bit of research into this, and found plenty of "anecdotal" evidence, but nothing confirming for sure. I'm looking and interacting with the controls and they seem pretty native - if they're a recreation than that's pretty impressive :)
- saagarjha 7y agoThe drawing is native and the interaction is handled by the browser.
- slightwinder 7y agoA GUI is a collection of elements with specific look and behaviour. A Desktop Environment is a collection of GUI(s), tools and services. Native means you have something which follows this look and behaviour 100% and can utilize all the tools and services. Implementing the look is simple, adding behaviour quite harder and utilizing the service the endgame. WebUI usually does nothing from those or some parts, it all depends on the constellation. But usually there is a obvious difference at some point where you realize whether something is native or just made an attempt.
- jcelerier 7y ago> This is not really accurate. Qt relies on a lower level windowing system (X Window, Wayland, Cocoa, win32 etc. etc.). Qt also supports rendering directly on the GPU (or with software rendering on the framebuffer) without any windowing system such as X11 or Wayland - that's likely how it is most commonly used in the wild, as that's one of the main way to use it on embedded devices.
- PaulDavisThe1st 7y agoI'd like to see it do that on macOS ... You're seriously suggesting that the common use of Qt on Linux systems is direct rendering without the windowing system?
- gwillz 7y agoNot parent, but yes, sort of. Arguably it's use in embedded contexts is much larger than desktop. It's quite popular for in-car computers, defense systems, etc. For desktop linux, yes, it uses the windowing system.
- jcelerier 7y agoWell, yes. I can't tell too much because of NDAs but if you go buy a recent car there is a good chance that all the screens are rendered with Qt on Linux or a RTOS - there is likely more of those than desktop linux users as much as this saddens me
- saagarjha 7y agoOn macOS Qt doesn’t really use Cocoa, it use Quartz/CoreGraphics (the drawing rather than the application layer). Note that Apple’s pro apps are native controls with a UI theme: they usually behave like their unthemed counterparts.
- PaulDavisThe1st 7y agoI had meant to write Quartz, not Cocoa. I know how Qt works at that level. I did a bunch of work in the mid-naughts on the equivalent stuff in GTK.