Форум вопросов и ответов

Форум вопросов и ответов (https://www.otvetnemail.ru/)
-   Новые вопросы и ответы 3 (https://www.otvetnemail.ru/novye-voprosy-i-otvety-3-822/)
-   -   QtConcurrent::run, непонятки (https://www.otvetnemail.ru/novye-voprosy-i-otvety-3-822/qtconcurrent-run-neponyatki-262923/)

Guest 28.09.2011 21:58

QtConcurrent::run, непонятки
 
Хочу считать файл в другом потоке, используя QImageReaderКод:QImageReader imgReader;imgReader.setFileName("filenam e");QImage *img = new QImage();QFuture future = QtConcurrent::run(imgReader, &QImageReader::read);*img = future.result();получаю:Цитировать../Qt/4.4.1/include/QtGui/../../src/gui/image/qimagereader.h: In constructor `QtConcurrent::StoredMemberFunctionCall0 ::StoredMemberFunctionCall0(T (Class::*)(), const Class&) [with T = QImage, Class = QImageReader]':../Qt/4.4.1/include/QtCore/../../src/corelib/concurrent/qtconcurrentrun.h:169: instantiated from `QFuture QtConcurrent::run(const Class&, T (Class::*)()) [with T = QImage, Class = QImageReader]'image.cpp:53: instantiated from here../Qt/4.4.1/include/QtGui/../../src/gui/image/qimagereader.h:133: error: `QImageReader::QImageReader(const QImageReader&)' is private../Qt/4.4.1/include/QtCore/../../src/corelib/concurrent/qtconcurrentstoredfunctioncall.h:120: error: within this contextmingw32-make[1]: *** [debug/image.o] Error 1Что я делаю не так?


Часовой пояс GMT, время: 20:52.


© www.otvetnemail.ru - Форум вопросов и ответов.