[Development] QStandardItemModel moved to "QtWidgets" module, not good idea?

gunnar.sletta at nokia.com gunnar.sletta at nokia.com
Tue Jan 3 16:59:49 CET 2012


On Jan 3, 2012, at 11:30 AM, ext Ville M. Vainio wrote:

> On Mon, Jan 2, 2012 at 8:20 AM,  <gunnar.sletta at nokia.com> wrote:
> 
>> QIcon is a style concept and belongs together with QStyle and we do not want QStyle in QtGui. 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.
> 
> So, in summary, we need to discover a new way to ease porting of Qt4
> QML apps that use these classes to Qt5 (for platforms and apps that
> don't want to ship the whole widgets module for just a few silly
> classes).

Indeed. The widgets library became a place were we put classes that we wanted out of Gui, even though they were not directly "widgets" classes. We had the same situation with the printing classes were we eventually want a replacement, but the Qt 4 classes need to be there for porting reasons and for feature completeness until a new library surfaces. The result was that they initially went into QtWidgets, but they were later refactored into the libQtPrintSupport library. 

It might be an idea to take a few more classes out of the widgets library and placing them in their own self contained library to ease the porting effort without having to add the dependency to QtWidgets.

> 
> Where would this work happen? Would such a compatibility module (Qt
> add-on?) have a chance of residing in Qt5 upstream, or should it be an
> ad hoc project shipped independently?

Such a module would have a very good chance of living in Qt5 upstream. It really depends on there being a maintainer for it and if we find which classes belong there :)

cheers,
Gunnar





More information about the Development mailing list