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

Stephen Kelly stephen.kelly at kdab.com
Mon Jan 2 17:53:15 CET 2012


On Monday, January 02, 2012 11:43:18 Olivier Goffart wrote:
> 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.

Regardless of the *Q*Icon case (I'm not familiar with its code), I don't see 
why an icon is a style concept.

> 
> > 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.

I agree that these shouldn't be tied to a particular gui concept as QML will 
need them too. Ideally the new classes would already be in place and these 
classes would be implemented in terms of that. 

But is there any time to do that at this point? If there isn't then we'll end 
up with fragmented API (duplicated concepts) probably like QQuickAction etc 
(which also doesn't make much sense if an action class shouldn't be tied to a 
gui concept).

Thanks,

-- 
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120102/89a0ed12/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120102/89a0ed12/attachment.sig>


More information about the Development mailing list