I have no problem using QPixmaps on linux, encryptoed fs or not. I am 99% sure that the file you are looking for does not exist, or has some other issue.
Why not also get a QFileInfo object and see if there is any correlation?
What I've seen (not with Qt) is when watching the FS, sometimes you get a notification before the file is done being written. If at all possible, "move" (rename) the file from somewhere else on the same partition to the final destination, this way the file will be atomically availible when the notification fires.
Sent: Thursday, August 27, 2015 at 4:19 PM
From: "Igor Mironchik" <igor.mironc...@gmail.com>
To: "interest@qt-project.org" <interest@qt-project.org>
Subject: [Interest] QPixmap on Linux
From: "Igor Mironchik" <igor.mironc...@gmail.com>
To: "interest@qt-project.org" <interest@qt-project.org>
Subject: [Interest] QPixmap on Linux
Hi.
I found that sometimes QPixmap can't load correct image file.
The next lines
const QPixmap p( path );
qDebug() << "is pixmap null" << p.isNull();
produces from time to time
I found that sometimes QPixmap can't load correct image file.
The next lines
const QPixmap p( path );
qDebug() << "is pixmap null" << p.isNull();
produces from time to time
is pixmap null true
What it can be? File exists, all is ok with image.
I have to say that I do monitoring of the folder for new image files with QFileSystemWatcher.
On directoryChanged(QString) I use QDir::entryInfoList() and check for modifications in directory. If so I emit signals fileAdded(QString) or fileRemoved(QString). In slot connected to fileAdded(QString) I'm loading QPixmap as I said before. But loading may fail.
Can it be problem with file system? May be file can't be opened from time to time?
I'm on Linux. File system is encrypted.
-- Best Regards, Igor Mironchik._______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest