[Qt5-feedback] The #include directives for Qt Essentials and Qt Add-on modules

henry.haverinen at nokia.com henry.haverinen at nokia.com
Fri Jul 1 13:20:05 CEST 2011


Here's an update based on an IRC discussion:

On 7/1/11 1:51 PM, "ext henry.haverinen at nokia.com"
<henry.haverinen at nokia.com> wrote:
>
>//Include all classes of a library in Qt Esssentials or of an add-on that
>was a Qt4 library 
>
>#include <QtFoo> 

This needs to be supported for source compatibility, but the correct way
that should be 
promoted in the documentation is:

#include <QtFoo/QtFoo>

>
>//include a class from Qt Essentials or from an add-on that was a Qt4 lib
>
>#include <QSomeClass>

The correct way would be
#include <QtFoo/QSomeClass>

I updated these to the naming wiki. The add-on section is still TBD:


>//Include all classes from Qt Add-on Foo
>//For consistency, this should work for former Qt4 libraries too
>#include <QtAddOn/Foo/Foo>
>
>//Include a class from Qt Add-on Foo
>#include <QtAddOn/Foo/QSomeClass //class name doesn't have to have the Q
>Prefix


Cheers,
Henry



More information about the Qt5-feedback mailing list