本文整理汇总了Python中pyqtgraph.GraphicsLayoutWidget.resize方法的典型用法代码示例。如果您正苦于以下问题:Python GraphicsLayoutWidget.resize方法的具体用法?Python GraphicsLayoutWidget.resize怎么用?Python GraphicsLayoutWidget.resize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.GraphicsLayoutWidget
的用法示例。
在下文中一共展示了GraphicsLayoutWidget.resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWidget
# 需要导入模块: from pyqtgraph import GraphicsLayoutWidget [as 别名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import resize [as 别名]
#.........这里部分代码省略.........
self.showFreqAction.triggered.connect(self.showFreq)
viewMenu.addAction(self.showFreqAction)
measureDistanceAction = QAction('&Measure &distance', self)
measureDistanceAction.setShortcut('Ctrl+D')
measureDistanceAction.setStatusTip('Measure distance between two atoms')
measureDistanceAction.triggered.connect(self.measureDistanceB)
measureMenu.addAction(measureDistanceAction)
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)