Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140479

Support Custom Fallback Styles

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2, Some future release
    • Quick: Controls 2
    • None
    • All

      We are building a white label UI solution which is heavily customized by project teams for specific customers. This means that we ship a default set of controls and ready-made UIs implementing different business cases while providing options to customize their look and feel.

      In order to enable customization of these user interfaces without forcing customizers to rebuild them and swap out specific elements or create some sort of overridable component factory, we decided to provide customization by creating a custom style. Our stock UIs are implemented using the template pattern established in QQC2.

      In a specific customization project, customizers can define their own style and override the UI elements we ship in the white label base style. This works well, but it has the drawback that we need to copy our style .qml files into each customization project, even the ones we don't want to customize since we can't specify our white label style as a fallback style. The copied .qml files just instantiate the white label style's implementations and delegate to the stock implementation this way. This works, but it creates a lot of unnecessary files in the customized style.

      It also causes issues when we want to extend the set of controls we provide and the customized project does not contain a .qml file implementing this control in their style. Since we can't specify our white label style as fallback, no UI implementation would be available for this control and our customizers would have to add a file for it to their project. They are non-technical people and we'd like to prevent that.

      So my question is: why can't we specify custom styles as fallback? Is it a lot of effort to support this? Note that we need one level of fallback only, our white label base does not have to have Base style or something else as fallback since we provide implementations for all controls we support.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alexanderstillich Alexander Stillich
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes