[Development] Moving itemmodels classes to QtCore

alan.alpert at nokia.com alan.alpert at nokia.com
Wed Nov 23 11:04:53 CET 2011


Bart Cerneels said:
>I incorrectly assumed that they were already in QtCore along with
>QAIM. I for one am a big fan of using proxymodels with/from QML and
>can think of quite a few use-cases.

Note that it doesn't have to be in QtCore to use with QML. QtGui would do just as well, but these QAIM classes have nothing to do with the graphical representation of the data, so QtCore makes more sense. You might use them with a system daemon and CLI interface in theory.

>I also feel there needs to be a brainstorm about how typical GUI
>elements (icons, images, fonts, etc) interact with models and proxies.
>Even though it's not a dependency: enum Qt::ItemDataRole is used
>solely but QAIM and the documentation equates it to QtGui classes like
>QColor, QIcon and QPixmap. Since we are moving the entire QAIM stack
>out of QtGui I think the recommended practice of passing data should
>change to.

GUI is the primary usecase of Qt, and all those classes can be used with the various GUI elements Qt provides already (QtQuick, QWidgets). So it makes sense that even though you can use QAIM without a GUI, you probably will and the recommended practices suggest this.

QAIM helpers are being moved out of QtWidgets, because you might use them without widgets, and I'd be just as happy to see them in QtGui as QtCore (Note: I approve of moving them to QtCore).

--
Alan Alpert


More information about the Development mailing list