Add to test_data images preview.

This commit is contained in:
Jarosław Wieczorek 2020-12-23 17:55:14 +01:00
parent f18c4a8eb7
commit 159ee227b7

View File

@ -55,9 +55,25 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def test_data(self):
self.line_edit_audio_1.setText('./src/sounds/oba_kanały.mp3')
pixmap1 = QPixmap('./src/gui/images/both.png')
scaled_pixmap1 = pixmap1.scaled(pixmap1.size(), Qt.KeepAspectRatio)
self.preview_label_avatar_1.setPixmap(scaled_pixmap1)
self.preview_label_avatar_1.setProperty('path', './src/gui/images/both.png')
pixmap2 = QPixmap('./src/gui/images/none.png')
scaled_pixmap2 = pixmap2.scaled(pixmap2.size(), Qt.KeepAspectRatio)
self.preview_label_avatar_2.setPixmap(scaled_pixmap2)
self.preview_label_avatar_2.setProperty('path', './src/gui/images/none.png')
pixmap3 = QPixmap('./src/gui/images/left.png')
scaled_pixmap3 = pixmap3.scaled(pixmap3.size(), Qt.KeepAspectRatio)
self.preview_label_avatar_3.setPixmap(scaled_pixmap3)
self.preview_label_avatar_3.setProperty('path', './src/gui/images/left.png')
pixmap4 = QPixmap('./src/gui/images/right.png')
scaled_pixmap4 = pixmap4.scaled(pixmap4.size(), Qt.KeepAspectRatio)
self.preview_label_avatar_4.setPixmap(scaled_pixmap4)
self.preview_label_avatar_4.setProperty('path', './src/gui/images/right.png')
def open_image_import(self, image_number: int):