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

Impossible to use namespaces in the property declaration

XMLWordPrintable

      Namespaces are here for avoiding the naming conflicts and for readability. Unfortunately, they can't be used when declaring properties that kind of kills half of the namespace usefulness and forces you to either import everything into the global namespaces or forget the type system and work around with variants.

      Example:

      import QtQuick 1.0 as QtLib
      
      QtLib.Rectangle {
          width: 400
          height: 300
      
          //the following doesn't work
          property QtLib.Rectangle fullyQualifiedProp: null
      
          // the following works
          property variant varProp: QtLib.Rectangle {}
      }
      

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

            martjone Martin Jones (closed Nokia identity) (Inactive)
            artem.marchenko Artem Marchenko
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes