[Qt5-feedback] Moving itemmodels to QtCore

Sean Harmer sh at theharmers.co.uk
Mon Jul 4 10:30:05 CEST 2011


Hi,

On Friday 01 July 2011 14:12:18 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? Long term I'd rather
> like to see some simpler to use models for lists and tables.

We have recently had a use case where we would have liked to have used 
QSortFilterProxyModel in a non-gui library that is aimed to be used by a 
desktop app and a headless app on a server. This is not possible due to the 
above being part of QtGUI. We ended up reusing the QSFPM subclasses in both 
GUI and headless versions of the apps themselves.

I would vote for moving the above into QtCore where possible.

Cheers,

Sean



More information about the Qt5-feedback mailing list