PDA

View Full Version : Qt 4.4 getOpenFileName error



bunjee
9th May 2008, 21:38
void ZePhotoList::onBrowsePhoto()
{
QString filePath = QFileDialog::getOpenFileName(0,
tr("Open Image"),
QDir::home().path(),
tr("Image Files
(*.png *.jpg *.bmp)"));
}

On wn32, when running that line I get a loop of :
QFile::seek: IODevice is not open

Any idea ?

bunjee
10th May 2008, 01:09
Jeez that was a conflict with QMovie.
I had to add setCacheMode(QMovie::CacheAll); to avoid this.


//================================================== ===========================
//================================================== ===========================

ZeAnimationWidget::ZeAnimationWidget(const QString & filePath,
QWidget * parent) :
QLabel(parent)
{
mMovie = new QMovie(filePath, QByteArray(), this);

setMovie(mMovie);

// I had to add this to avoid IO conflcts
mMovie->setCacheMode(QMovie::CacheAll);

mMovie->start();
}

Anybody knows why ?