On Wednesday, September 12, 2012 19:16:29 Till Oliver Knoll wrote: > In fact, that is exactly the reason why I thought 'module includes' are such > a great idea, as to not to forget to write > > QT += widgets > > Besides, they force me to think twice whether the #include is at the proper > place (e.g. I would like not to introduce dependencies on any GUI or > widgets in my "model.dll").
Then simply don't use QT += widgets in model.pro. If you accidentally include <QWidgets/QAction> in a public header of model.dll, you *are* introducing widgets as a dependency of model.dll for downstreams. If I don't install QtWidgets, the header won't be there, and I can't use model.dll. Your build tools don't tell you that there is a problem. It compiles just fine (for you), even though the include should not be there. If you instead include <QAction>, your compiler will not find that header and you will immediately know you made a mistake. Thanks, -- Stephen Kelly <stephen.ke...@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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest