[Development] QIcon, ... in QtGui (was: QStandardItemModel moved to "QtWidgets" module, not good idea?)

Olivier Goffart olivier at woboq.com
Mon Jan 2 11:43:18 CET 2012


On Monday 02 January 2012 06:20:59 gunnar.sletta at nokia.com wrote:
> The argument does indeed exists. QtGui's primary function is to be a
> windowing system and graphics enabler. The minimum that is shared between
> QML and widgets.

Ok

> > There is also QFileSystemModel which could be moved to QtGui if QIcon
> > was moved also (why is QIcon in widgets?) and its dependency on
> > QMessageBox was removed.

> QIcon is a style concept 

Not exactly (it is the enabler for the toolbar, menubar, actions, ... in a way 
that is totally independent of the style.  Only QIcon::fromTheme is related to 
the style)
But let us assume it is.


> and belongs together with QStyle and we do not want QStyle in QtGui.

No, eventually, QML will need style as well. (on desktop)
You can have style outside of QStyle.

> As both the QFileSystemModel and QStandardItemModel relies on it, they
> cannot be moved to Gui. At least not without some surgery, and
> the surgery would imply source breakage so also not an option.

QIcon in QtGui would fix it :-)


Also, i think QAction, and QShortcut should go to QtGui.




More information about the Development mailing list