[Qt5-feedback] Moving itemmodels to QtCore
Stephen Kelly
steveire at gmail.com
Fri Jul 1 14:27:18 CEST 2011
lars.knoll at nokia.com wrote:
> On 7/1/11 2:02 PM, "ext Stephen Kelly" <steveire at gmail.com> wrote:
>
>>
>>Hi,
>>
>>One of the things I indend to do with Qt 5 is to move the itemmodel
>>classes
>>which currently are in QtGui into QtCore. This is:
>>
>>* QAbstractProxyModel
>>* QItemSelectionModel, QItemSelection, QItemSelectionRange
>>* QSortFilterProxyModel
>>* QIdentityProxyModel
>>* QStringListModel (#includes QAbstractItemView but apparently doesn't
>>use
>>it)
>>
>>QFileSystemModel uses qicon qbrush etc which are in QtGui, so either the
>>QtGui using stuff would be split out, or the QFileSystemModel goes
>>wherever
>>those classes go.
>>
>>Any reason not to do this stuff? What do people think of what should
>>happen
>>to QFileSystemModel?
>
> Let's ask the other way round: Any reason to do this?
It depends on whether QtDeclarative depends on QtGui still or not. These
classes are still useful in QML applications. Particularly because there is
already code using them, so porting, sharing code between applications on
different form factors and using existing knowledge and experience is
possible.
> Long term I'd rather
> like to see some simpler to use models for lists and tables.
I've heard this several times, but so far no one has said anything about
trees, which are important.
Yes it's possible to make new classes which don't have that nasty
QModelIndex for tables and lists. Go ahead and make those new classes if you
want.
But to replace the existing models you'll need to think about trees too. So
far I haven't seen any trolls consider that at all. Do you want to design a
new class for that too or use the existing tested and known code?
Cheers,
Steve.
More information about the Qt5-feedback
mailing list