import sys from PyQt5.QtWidgets import QApplication, QComboBox, QMainWindow from PyQt5.QtWidgets import QListWidget class MainWindow(QMainWindow): def __init__(self): super().__init__() listWidget = QListWidget(self) listWidget.move(30, 30) listWidget.resize(120, 120) listWidget.addItem('alma') listWidget.addItem('körte') listWidget.addItem('barack') listWidget.addItem('szilva') self.setGeometry(100, 100, 320, 200) self.show() if __name__ == '__main__': app = QApplication(sys.argv) mainWindow = MainWindow() sys.exit(app.exec_())