blob: 256c4e203b8c84f4414c39b76c3698a25fe18157 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import sys
from PySide.QtCore import *
from PySide.QtGui import *
class ListModel(QAbstractListModel):
def rowCount(self, parent = QModelIndex()):
return len(self._items)
app = QApplication([])
model = ListModel()
v = QListView()
v.setModel(model)
QTimer.singleShot(0, v.close)
app.exec_()
|