QT: QFileSystemModel _q_fileSystemChanged slot is executed on the UI thread which contradicts docume

http://stackoverflow.com/questions/4055726/qt-qfilesystemmodel-q-filesystemchanged-slot-is-executed-on-the-ui-thread-whic

QFileIconProvider uses QIcon to represent icons and QIcon can only be used in the UI thread. QImage seems to be the only class allowed to use in other threads, but I think it may be to expensive to use QImage in the background thread and convert it to an QIcon in the UI thread.

So it is possible that the platform implementation of QFileIconProvider is slow on network paths under some circumstances and therefore slows down the UI main thread.

I don't know if this is the source of your problem, but at least this should be the reason why _q_fileSystemChanged() is called within the UI thread.

你可能感兴趣的:(QT: QFileSystemModel _q_fileSystemChanged slot is executed on the UI thread which contradicts docume)