On Wed, Jan 8, 2014 at 5:31 AM, Sebastian Lehmann <[email protected]> wrote: > 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?
Repeating Kai a bit... Timer, Component and others have already undergone this. They are available in the QtQml import (as well QtQuick, for convenience and compatibility with QtQuick 1.0) allowing you to use them without a QGuiApplication. Animations are tied into QtQuick a little deeper though, and only Timer is available in the QtQml import. The QtQml import already exists, and provides that "core" plugin of types. However it can only depend on QtCore so if Qt3D stuff pulls in QtGui or needs a QGuiApplication then it has to go in QtQuick (at least). > 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? We've thought of it (especially for the brief period where there was a bug, and if you imported QtQuick.Particles without first importing QtQuick then it would crash :P ), the problem is that this leads to "hidden" imports. It's easy to forget you depend on those extra imports. But the main problem is about the rest of the statement "import QtFoo x.y as Name". A dependency from QtFoo->QtBar is fairly straight forward, it gets complex when you add the version numbers (because it will be compatible with any minor versions) and it gets ugly when you realize that you can't import it in a namespace anymore. -- Alan Alpert _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
