181 # write a blank pixmap on error |
181 # write a blank pixmap on error |
182 pixmap = QPixmap(size, size) |
182 pixmap = QPixmap(size, size) |
183 pixmap.fill(Qt.transparent) |
183 pixmap.fill(Qt.transparent) |
184 imageBuffer.buffer().clear() |
184 imageBuffer.buffer().clear() |
185 pixmap.save(imageBuffer, "PNG") |
185 pixmap.save(imageBuffer, "PNG") |
186 return cssString.format(size + 4, |
186 return cssString.format( |
|
187 size + 4, |
187 str(imageBuffer.buffer().toBase64(), encoding="ascii")) |
188 str(imageBuffer.buffer().toBase64(), encoding="ascii")) |
188 |
189 |
189 def __loadDirectory(self): |
190 def __loadDirectory(self): |
190 """ |
191 """ |
191 Private slot loading the directory and preparing the listing page. |
192 Private slot loading the directory and preparing the listing page. |