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

Restructure the QtQuick.Dialogs module to make it friendlier for qml compiler

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Quick: Dialogs
    • None

    Description

      The non-native dialogs in QtQuick.Dialogs are using file selectors for choosing which qml file to use, depending on the QQC2 style that is used by the application, when the qml engine is initialized during runtime.

      This makes it impossible to take advantage of qmlcachegen for compiling the qml to C++ (for the increased performance gain), since it won't have enough information during compile time.

      The quickcontrols2 module used to have the same problem, but the cmake project structure was changed to use the OPTIONAL_IMPORTS option in qt_internal_add_qml_module() among other things, to make the module friendlier for qmlcachegen.

      We should change the cmake project structure of quickdialogs2 to be more similar to the quickcontrols2 module.

       

      The behavioural changes that will result from this, will be that users can write

      import QtQuick.Dialogs.Fusion

      in their qml files.

      This will strictly enfore that particular style, but it will have a much better performance, since that version of the dialog will have been processed by qmlcachegen.

      Note that we still want users to be able to write the old

      import QtQuick.Dialogs
      

      syntax. Which should pick the style that was dynamically set by the user: https://doc.qt.io/qt-5/qtquickcontrols2-styles.html

      We don't want to remove any of the existing feature, but rather simply improve the performance for the developers that want to enforce a particular style.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-104091
          # Subject Branch Project Status CR V

          Activity

            People

              hurlevent Oliver Eftevaag
              hurlevent Oliver Eftevaag
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are 2 open Gerrit changes