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

Add support for inline components

XMLWordPrintable

    • All
    • 684f9df7849bc79f1f02a60844fb43c7a3927d2f (qt/qtdeclarative/5.15)

      Currently new composite types require a separate .qml file. To faciliate various features we would like to be able to specify new types also within a .qml file. The proposed syntax introduces a new lower-case component keyword.

      Suppose we have Button.qml:

      import QtQuick 5.15
      Item {
          ...
          component StandardBorder : Rectangle {
              property color color;
              ...
          }
          ...
      }
      

      Such QML code would make a new type Button.StandardBorder available for use as regular type for instantiation.

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

            fabiankosmale Fabian Kosmale
            shausman Simon Hausmann
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes