A Listbox (QListWidget) presents several options. You can click on an item. Think of a song playlist. Unlike a combobox it shows all possible options.

The screenshot below shows a PyQt list box in a window.

pyqt listbox

Download Examples:
Download PyQt examples

PyQt Listbox example

QListWidget

A listbox widget is created with QListWidget(). An item is then added with self.listwidget.insertItem(0, "Red") where the first parameter is the index.

The click event is added with the method clicked, self.listwidget.clicked.connect(self.clicked)

from PyQt5.QtWidgets import *
import sys

class Window(QWidget):
def __init__(self):
QWidget.__init__(self)
layout = QGridLayout()
self.setLayout(layout)
self.listwidget = QListWidget()
self.listwidget.insertItem(0, "Red")
self.listwidget.insertItem(1, "Orange")
self.listwidget.insertItem(2, "Blue")
self.listwidget.insertItem(3, "White")
self.listwidget.insertItem(4, "Green")
self.listwidget.clicked.connect(self.clicked)
layout.addWidget(self.listwidget)

def clicked(self, qmodelindex):
item = self.listwidget.currentItem()
print(item.text())

app = QApplication(sys.argv)
screen = Window()
screen.show()
sys.exit(app.exec_())