QtQuick use in FlightGear: Difference between revisions

Jump to navigation Jump to search
m
m (https://sourceforge.net/p/flightgear/mailman/message/37701750/)
Line 5: Line 5:


== Status ==
== Status ==
Qt 5.9 is the correct minimum version (for next)  <ref>https://sourceforge.net/p/flightgear/mailman/message/37266895/</ref>
{{Main article|PUI}}


'''Update 01/2021 in response to the announcement that Qt as LTS release goes commercial-only''' <ref>https://www.theregister.com/2021/01/05/qt_lts_goes_commercial_only/</ref>:James stated we’re already using much older versions of Qt. (5.12 LTS) Only change might be: we’ll build some version of Qt ourselves on Jenkins for Windows, so that people who want to build from source on Windows don’t need to build Qt themselves. Slightly longer answer is: TQC don’t want to provide supported *binary* releases for older versions, to ‘free’ users. Which is annoying, but it does have a cost for them. The *source* is the same license as always (GPL/LGPL), but we need to make binaries ourselves. Of course on macOS with Homebrew and Linux with the distro-provided Qt, this is irrelevant anyway: the issue is just providing a sensible workflow for Windows.
{{Note| Update 09/2022: The PUI replacement was going to be Qt but it started to get very complicated with changes in Qt 5.15 + Qt 6, so James is going with a more light-weight approach now.
<ref>https://sourceforge.net/p/flightgear/mailman/message/37191680/</ref>


James coded up a Canvas QtQuick item for Qt replacing [[PUI]] (needs testing) since something like the [[Canvas MapStructure|map dialogs]], makes no sense to do a new API for. So he expects we’ll use Qt fo the main UI (menus, dialogs, buttons, overlays like the MP pilot list) and emulating [[PUI]], but we have the option to embed pieces of [[Canvas]] - for things like fuel / payload screens, map views or whatever.<ref>{{cite web
Qt added support for Vulkan / Metal / D3D starting in 5.15, but FlightGear / OpenSceneGraph can’t support those, so integrating the two renderers went from being ‘complicated but ok’  to ‘very very complicated’(If for some reason anyone wants the code to render Qt Quick in OpenGL mode into OpenSceneGraph, I have it working nicely on a branch, from about two years ago...)
  |url    = https://sourceforge.net/p/flightgear/mailman/message/36068236/
  |title  =  <nowiki> Re: [Flightgear-devel] PLIB features in plib svn but not in any
release </nowiki>
  |author =  <nowiki> James Turner </nowiki>
  |date  =  Oct 8th, 2017
  |added  =  Oct 8th, 2017
  |script_version = 0.40
  }}</ref>


The required Qt version was raised to 5.4 because it should have everything we need, API-wise.<ref>{{cite web
So now James is now going with something much lightweight using some C++ compatibility code, some Nasal for styling and the existing widget rendering from Thomas Geymayer (TheTomo) with some extensions and additions: some pieces are in FlightGear & FGData already. James has basic dialogs working okay but not the more complex ones and everything looks kind of ugly, he needs to improve the visual look before he shares screenshots to avoid everyone freaking out :) The disadvantage of this approach is James is far from expert at creating visual appearances this way, so it’s kind on unrewarding and slow for him. If someone likes messing with CSS-type styling, border-images and hover-states, ping me since we could probably move things also faster <ref>https://sourceforge.net/p/flightgear/mailman/message/37701750/</ref>}}
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/36068220/
  |title  =  <nowiki> Re: [Flightgear-devel] FlightGear compile error:
src/GUI/QQuickDrawable.cxx </nowiki>
  |author =  <nowiki> James Turner </nowiki>
  |date  =  Oct 8th, 2017
  |added  =  Oct 8th, 2017
  |script_version = 0.40
  }}</ref>
 
The aircraft centre will be the first thing James is planning to switch to using the new Qt GUi, by sharing the QtQuick implementation with the launcher. Right now, he's modifying the appearance based on some feedback, especially from ThorstenR, and to expose more info. This will let me use the aircraft page as a proof of concept for the new UI system, and then test hosting the UI that way.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/36076948/
  |title  =  <nowiki> Re: [Flightgear-devel] Aircraft centre broken </nowiki>
  |author =  <nowiki> James Turner </nowiki>  
  |date  =  Oct 15th, 2017
  |added  =  Oct 15th, 2017
  |script_version = 0.40
  }}</ref>


== Background ==
== Background ==

Navigation menu