troorl
3rd September 2008, 05:59
Hi.
I'm extending QFileDialog with preview support. When user clicked on the graphic file, image must be set to the QLabel. I doing it in new thread because loading big images is slow sometimes.
QPixmap is not supported to creating in new threads. I'm loading file in QPicture:
QPicture *pic = new QPicture;
pic->load(file);
But it returned warning to console:
QPicturePaintEngine::checkFormat: Incorrect header
and file is not loaded.
Can't anybody help me with this problem?
P.S. Sorry for my English.
I'm extending QFileDialog with preview support. When user clicked on the graphic file, image must be set to the QLabel. I doing it in new thread because loading big images is slow sometimes.
QPixmap is not supported to creating in new threads. I'm loading file in QPicture:
QPicture *pic = new QPicture;
pic->load(file);
But it returned warning to console:
QPicturePaintEngine::checkFormat: Incorrect header
and file is not loaded.
Can't anybody help me with this problem?
P.S. Sorry for my English.