本文整理汇总了Python中PyQt4.Qt.QListView.setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:Python QListView.setMinimumSize方法的具体用法?Python QListView.setMinimumSize怎么用?Python QListView.setMinimumSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QListView
的用法示例。
在下文中一共展示了QListView.setMinimumSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: readEvents
# 需要导入模块: from PyQt4.Qt import QListView [as 别名]
# 或者: from PyQt4.Qt.QListView import setMinimumSize [as 别名]
#!/usr/bin/env python
from PyQt4.Qt import QApplication, QListView, QStandardItemModel, QStandardItem
import sys
from obspy import readEvents
cat = readEvents("/home/megies/svn/mixed/katalog_unterhaching_stand_2013-04-30.intern.xml")
# Create a Qt application
app = QApplication(sys.argv)
# Our main window will be a QListView
list = QListView()
list.setWindowTitle('Example List')
list.setMinimumSize(600, 400)
# Create an empty model for the list's data
model = QStandardItemModel(list)
## # Add some textual items
## foods = [
## 'Cookie dough', # Must be store-bought
## 'Hummus', # Must be homemade
## 'Spaghetti', # Must be saucy
## 'Dal makhani', # Must be spicy
## 'Chocolate whipped cream' # Must be plentiful
## ]
##
## for food in foods:
## # create an item with a caption
## item = QStandardItem(food)