from PyQt4.QtCore import * from PyQt4.QtGui import * print 'pyqt', PYQT_VERSION_STR, 'with qt', qVersion() class Window(QListWidget): def __init__(self, *args): QListWidget.__init__(self, *args) for i in range(200): QListWidgetItem(str(i), self).setHidden(i % 3 != 0) self.show() app = QApplication([]) w = Window() app.exec_()