This one is really giving me a headache. I'm loading an animated gif and setting it as a movie in a QLabel.
if (!status_gif->isValid()) {
QMessageBox::information(this,
"Error",
"This Sucks...");
}
status_gif->start();
_status_animation
= new QLabel();
_status_animation->setMovie(status_gif);
_status_animation->setFixedSize(31,31);
status_layout->addWidget(_status_animation);
QMovie *status_gif = new QMovie("status.gif");
if (!status_gif->isValid()) {
QMessageBox::information(this, "Error", "This Sucks...");
}
status_gif->start();
_status_animation = new QLabel();
_status_animation->setMovie(status_gif);
_status_animation->setFixedSize(31,31);
status_layout->addWidget(_status_animation);
To copy to clipboard, switch view to plain text mode
This works great on my machine (the one I wrote the code on), but on any other machine I try, isValid() fails. The file exists in the correct place (current directory), I've checked a hundred times. Any clue as to what could cause a gif not to load?
Bookmarks