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

vector3d should be valid on the QML property statement

    XMLWordPrintable

Details

    Description

      The property statement should be amended to take vector3d as a type, so that you can write
      property vector3d vec1
      property vector3d vec2: "1,0,0" // literal
      property vector3d vec3: Qt.vector3d(scale,0,0) // computed
      instead of just stuff like
      property variant vec1
      property variant vec2: "1,0,0" // literal
      property variant vec3: Qt.vector3d(scale,0,0) // computed
      which is what you have to do today.

      The fact that you need to code variant just seems odd, especially given that http://doc.qt.nokia.com/latest/qdeclarativebasictypes.html lists vector3d as a basic type. As things stand, every QML3D programmer is going to find out the hard way what you have to do.

      It would be nice incidentally to have a concise, accurate and full description of the property statement. I have never been able to find one, in 15 months or so of QML programming.

      It's possible that if you do this for vector3d, it would make sense to do it for point, size, rect and perhaps other types also. The fact is that in 3D programming you end up creating a lot of vector3d properties, whereas I've hardly ever been tempted to create a point/size/rect property previously and so haven't noticed the omission from the property statement. I suspect that experience is not unusual.

      Attachments

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

        Activity

          People

            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            martintasker Martin Tasker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes