152 @param filename name of the file to be shown (string) |
154 @param filename name of the file to be shown (string) |
153 @return flag indicating success (boolean) |
155 @return flag indicating success (boolean) |
154 """ |
156 """ |
155 image = QImage(filename) |
157 image = QImage(filename) |
156 if image.isNull(): |
158 if image.isNull(): |
157 QMessageBox.warning(self, |
159 E5MessageBox.warning(self, |
158 self.trUtf8("Pixmap-Viewer"), |
160 self.trUtf8("Pixmap-Viewer"), |
159 self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed.""" |
161 self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed.""" |
160 """ The format is not supported.</p>""").format(filename)) |
162 """ The format is not supported.</p>""").format(filename)) |
161 return False |
163 return False |
162 |
164 |