Qt5 QtConcurrent
-
Hello,
I'm trying to migrate my project from Qt4 to Qt5. QtConcurrent is no longer shipped in Qt5. Where can I download it, it is compatible ?
Thanks
-
What makes you think it isn't included?
It's in the Qt 5.0 documentation:
http://qt-project.org/doc/qt-5.0/qtconcurrent/qtconcurrent.htmlAnd in the source tree:
http://qt.gitorious.org/qt/qtbase/trees/stable/src/concurrent(Note: It is in the "qtbase" sub-module of Qt 5, because Qt has been modularized)
-
You're right. I was not looking in the right folder.
Thanks -
in Qt5, try the follow way:
#include <QtConcurrent/QtConcurrentMap>
#include <QtConcurrent/QtConcurrentRun>but if we edit our pro file like this:
LIBS += -lQt5Concurrent
may be the best way.
-
[quote author="imtoby" date="1363097703"]
but if we edit our pro file like this:
LIBS += -lQt5Concurrent
may be the best way.[/quote]
Hi. I have the same problem too. Keep saying undefined reference to bla bla bla...
After adding
@
LIBS += -lQt5Concurrent
@to my project file and
@
#include <QtConcurrent/QtConcurrent>
@to my source file the code build and run as expected. Thanks!
-
Also you should add to project file
@QT += concurrent@"See here":http://qt-project.org/doc/qt-5.0/qtconcurrent/map-map-pro.html