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