[Interest] My experience porting to Qt5 (on OS X)

Stephen Kelly stephen.kelly at kdab.com
Wed Sep 12 17:47:47 CEST 2012


On Wednesday, September 12, 2012 16:20:01 Nikos Chantziaras wrote:
> On 02/09/12 14:38, Till Oliver Knoll wrote:
> > The effor was indeed very painless: in my case I mainly had to adjust a
> > few #include (<QtGui/Whatever> -> <QtWidgets/Whatever>) and change
> > QDir::convertSeparators to QDir::toNativeSeparators.
> 
> Note that if you just do:
> 
>    #include <Whatever>
> 
> then you can build with both Qt4 and Qt5.

If you do this, you also avoid mysterious linking errors resulting from 
#include <QtWidgets/QWidget> without QT += widgets.

That's why 'module includes' are a bad idea.

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 --------------
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/interest/attachments/20120912/a7da69c9/attachment.sig>


More information about the Interest mailing list