3 ms·
I'm eyeing Qt (QML/Quick in particular) as a UI toolkit for a smart TV form factor-like embedded app. Primarily keyboard controlled. Small scale project, just m
by tpmx 6y ago
I'm eyeing Qt (QML/Quick in particular) as a UI toolkit for a smart TV form factor-like embedded app. Primarily keyboard controlled. Small scale project, just myself initially.
Qt doesn't really seem to focus much on this form factor, but they do have a big win; LG's webOS.
I've found some basic blog posts on the topic but nothing that has really convinced me. Anyone with first-hand experience on how this would work? A lot of upstream swimming?
- CarVac 6y agoI haven't dug deep into QML's keyboard focus stuff but it's been a breeze for developing my photo editing desktop app. It makes gui hacking so fun. https://filmulator.org https://filmulator.org
- throwaway9870 6y agoI used QML for a similar application because it would allow me to assemble the OpenGL scene nicely. I used libMPV to render video frames and QML could easily overlay controls and text. You could even render Chromium (QtWebEngine) on the same scene with minimal effort. I know enough to be dangerous, but not enough to dive deep into the stack of technologies, nonetheless, I got a decent app working with no bugs that customers ever ran into. For my skill level and effort put forth, I don't know what I could have used to would have worked as well.
- tpmx 6y agoTo expand on what I'm misssing: Official/built-in support for spatial navigation, like: https://github.com/qt-labs/cursormanagement https://github.com/qt-labs/cursormanagement I'm guessing most Quick widgets aren't immediately usable in this form factor. I'd guess they'd need heavy skinning efforts and custom cursor management to have a chance, and still only the most basic ones would be usable. Is there any other ~open UI toolkit that's good at TV-style/D-pad-focused navigation out there?
- detaro 6y agoDon't you want a custom design (re "skinning") anyways for an application like that? Yes, navigation is something you'd need to at least partially build yourself, but in my experience it's not a big deal (I haven't done TV apps specifically, but lots of embedded things with D-pad-like controls), since most UIs have clear navigation hierarchy. QML is very common for this kind of application, and I'm not aware of anything else widely used and open that'd be better for this specific thing.
- tpmx 6y ago> Don't you want a custom design (re "skinning") anyways for an application like that? Yes, probably. I was still holding out hope for some framework that had some decent basic widget designs for a TV-like format so that I didn't have to do all of the work on my own, but I guess that doesn't exist. (I can adjust the design of my app to whatever is available.) Thanks!
- saidinesh5 6y agoI've worked on a couple of d-pad only uis using QtQuick, Including for a set top box. Gstreamer's qmlglsink works quite well with zero copy video playback. So CPU usage sits at 5-10% for a nice UI overlaid on top of a 1080p video stream on an embedded system. There are other third-party qt wrappers for gstreamer, but we didn't feel the need for it. Some were outdated too. https://github.com/GStreamer/gst-plugins-good/tree/master/tests/examples/qt https://github.com/GStreamer/gst-plugins-good/tree/master/te... Those examples show how to do basic video playback using gstreamer. The key navigation really isn't that difficult either: https://doc.qt.io/qt-5/qtquick-input-focus.html https://doc.qt.io/qt-5/qtquick-input-focus.html Just build your UI with a PageStack of Pages consisting of ListViews and GridViews, and that takes care of 90% of your navigation issues without you having to do anything. For eg. * filesystem explorer: ListView * playback controls: GridView Video Player Page: filesystem explorer + playback controls + video item and the page determines which item should get keyboard focus, based on certain actions/conditions. So far, the main pain point was licensing. Some of the very useful qt quick components (like layouts for one) are licensed under LGPL v3, so you have to be careful if you're including then in your system - because then you'd have to provide a way for the user to swap out qt libraries or have to go for the commercial version. Another pain point was CI. We had to manually build our own container with the Qt version we needed. The situation for CI improved recently i think.
- tpmx 6y agoThis gives me some starting points. Licensing: Thanks for that warning. I get that they want to make money, primarily off embedded customers. Haven't figured out my licensing model for this project yet, might even go full GPL.