3 ms·
Can I use the new fancy compiler stuff like Lambdas with QT? Does it still require a meta compiler?
by tomjen3 11y ago
Can I use the new fancy compiler stuff like Lambdas with QT? Does it still require a meta compiler?
- simfoo 11y agoYes and yes
- justsaysmthng 11y agoYes, you can use C++ 11 features with Qt. In Qt 5.4 I had to add CONFIG += c++11 to the .pro file. I haven't used it, but it seems Qt 5.5 supports C++ 14.
- slavik81 11y agoYou could use C++14 with Qt4 if you wanted. Your choice of standard doesn't really affect Qt much.
- distances 11y agoLambdas can be used e.g. with the new signal-slot syntax [1]. And yes, Qt uses the meta compiler, and it's hopefully going to stay that way as moc has a clear positive impact both on features and speed [2]. [1] https://wiki.qt.io/New_Signal_Slot_Syntax https://wiki.qt.io/New_Signal_Slot_Syntax [2] https://woboq.com/blog/moc-myths.html https://woboq.com/blog/moc-myths.html
- rhodysurf 11y agoWow I had no idea you could put lambdas in place of slots!! Thanks!!