本文整理汇总了Python中PyQt4.Qt.QTableView.setMinimumWidth方法的典型用法代码示例。如果您正苦于以下问题:Python QTableView.setMinimumWidth方法的具体用法?Python QTableView.setMinimumWidth怎么用?Python QTableView.setMinimumWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QTableView
的用法示例。
在下文中一共展示了QTableView.setMinimumWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWidget
# 需要导入模块: from PyQt4.Qt import QTableView [as 别名]
# 或者: from PyQt4.Qt.QTableView import setMinimumWidth [as 别名]
#.........这里部分代码省略.........
measureAngleAction = QAction('&Measure &angle', self)
measureAngleAction.setShortcut('Ctrl+Shift+D')
measureAngleAction.setStatusTip('Measure angle between three atoms')
measureAngleAction.triggered.connect(self.measureAngleB)
measureMenu.addAction(measureAngleAction)
aboutAction = QAction('&About', self)
aboutAction.setStatusTip('About this program...')
aboutAction.triggered.connect(self.about)
helpMenu.addAction(aboutAction)
aboutQtAction = QAction('&About Qt', self)
aboutQtAction.setStatusTip('About Qt...')
aboutQtAction.triggered.connect(self.aboutQt)
helpMenu.addAction(aboutQtAction)
# define GL widget that displays the 3D molecule model
self.window = widgets.MyGLView()
self.window.installEventFilter(self)
self.window.setMinimumSize(500, 500)
#self.window.setBackgroundColor((50, 0, 10))
self.updateView()
self.gaussianPlot = GraphicsLayoutWidget()
self.gaussianPlot.resize(750, 250)
self.gaussianPlot.setWindowTitle('Gaussian geometry optimization')
#self.gaussianPlot.setAspectLocked(True)
#self.gaussianPlot.addLayout(rowspan=3, colspan=1)
self.FreqModel = QStandardItemModel(1, 3, self)
self.freqTable = QTableView(self)
self.freqTable.setModel(self.FreqModel)
self.freqTable.setMinimumWidth(240)
self.freqTable.installEventFilter(self)
self.FreqModel.installEventFilter(self)
self.FreqModel.setHorizontalHeaderLabels(['Frequency','IR Intensity','Raman Intensity'])
for j, width in enumerate([80, 80, 80]):
self.freqTable.setColumnWidth(j, width)
self.freqWidget = QWidget()
self.freqWidget.setWindowTitle('IR frequency plot & table')
self.freqWidget.resize(800, 400)
self.freqWidget.layout = QHBoxLayout(self.freqWidget)
self.freqWidget.layout.setSpacing(1)
self.freqWidget.layout.setContentsMargins(1, 1, 1, 1)
self.freqPlot = GraphicsLayoutWidget()
self.freqWidget.layout.addWidget(self.freqPlot)
self.freqWidget.layout.addWidget(self.freqTable)
self.freqTable.clicked.connect(self.freqCellClicked)
# define other application parts
self.statusBar = QStatusBar(self)
self.fileDialog = QFileDialog(self)
# define application layout
self.layout = QVBoxLayout(self)
self.layout.setSpacing(1)
self.layout.setContentsMargins(1, 1, 1, 1)
self.layout1 = QHBoxLayout()
self.layout1.setSpacing(1)
self.layout1.addWidget(self.ZMatTable)
self.layout1.addWidget(self.window)
self.layout.addWidget(self.menuBar)
self.layout.addLayout(self.layout1)
self.layout.addWidget(self.statusBar)