[Development] Qt.vector3d() and friends

Charley Bay charleyb123 at gmail.com
Wed Jan 8 14:29:37 CET 2014


Sean Harmer sayeth:

> Hi,
>
> during the development of the new version of Qt3D's QML API we have come
> across an interesting (well if you like that kind of thing) problem.
>
> The issue is that at present the QML value type helpers for types such as
> QVector3D are provided by QtQuick meaning that we have to do
>
> import QtQuick x.y
>
> to be able to use them.
>
> There may well be cases where people wish to use Qt3D without QtQuick but
> we
> still need to be able to use these value types from within QML. So should
> we:
>
> 1) Just tell users to import QtQuick  everywhere
> 2) Replicate the value type helpers to Qt3D
> 3) Have some common way of providing these e.g. from QtQml
>
> 3) seems the most sane to me but of course is a change from the existing
> approach.
>
> 1) means we force a dependency of QtQuick on Qt3D for any given scene and
> means that users will get all of the 2D scenegraph stuff contained therein
> even
> if they don't want/need it.
>
> 2) Is bad as it's copy/paste coding and we would need to use a different
> object
> name that Qt (as in Qt.vector3d(0,0,0)) to prevent collisions if someone
> decides to use both QtQuick and Qt3D.
>
> Thoughts?


Agree with Sean:

I strongly support the (3) approach.  I suppose (1) could be a temporary
work-around until the (3) change is fully implemented, but I think we
should be headed-towards (3).

--charley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140108/ce78c37d/attachment.html>


More information about the Development mailing list