I want another window for the image file to be opened as soon as the app loads beside the main window.
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
from PyQt5.QtGui import QIcon, QPixmap
class App(QWidget):
def __init__(self):
super().__init__()
self.title = 'LEGO'
self.left = 10
self.top = 10
self.width = 640
self.height = 480
def initUI(self):
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
self.setStyleSheet("background-color: white;")
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = App()
sys.exit(app.exec_())
But I dont know how to display the image file as soon as my main window opens. I want my image window to be also opened just after my main window is loaded. I am new to pyqt5 please help