[Interest] QPixmap on Linux

Igor Mironchik igor.mironchik at gmail.com
Thu Aug 27 22:19:21 CEST 2015


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

Konsole output
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150827/57f715e1/attachment.html>


More information about the Interest mailing list