[Development] Qt.vector3d() and friends

Sebastian Lehmann qt at leemes.de
Wed Jan 8 14:31:27 CET 2014


Hi,

I'd find it "natural" if there was something like a QtCore plugin.  
Then, QtQuick and Qt3D (and other stuff) could depend on it; i.e.  
something analogous to the existing Qt modules dependency, but in the  
QML world.

I already encountered situations in which I wanted to use QtQuick  
stuff without the QtQuick *visual* items: Timer, Component,  
NumberAnimation etc. Why not separating QtQuick in non-visual and  
visual parts?

Of course, when importing QtQuick x.y, this should automatically  
resolve the dependency and also import QtCore x.y.

This indeed seems so naturally to me that I can't believe that nobody  
else has ever thought of that before, so I guess there is a reason why  
it's not organized like that?

Cheers,

Sebastian Lehmann


Quoting Sean Harmer <sean.harmer at kdab.com>:

> 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?
>
> Cheers,
>
> Sean
> --
> Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - Qt Experts - Platform-independent software solutions
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>





More information about the Development mailing list