from PyQt5.QtWidgets import * from PyQt5.QtGui import QPixmap import sys from functions.get_img_map import get_img_map class Window(QMainWindow): def __init__(self): super().__init__() self.acceptDrops() self.setWindowTitle("Image") self.setGeometry(0, 0, 600, 450) self.label = QLabel(self) get_img_map() self.pixmap = QPixmap('image.png') self.label.setPixmap(self.pixmap) self.label.resize(self.pixmap.width(), self.pixmap.height()) self.show() App = QApplication(sys.argv) window = Window() sys.exit(App.exec())