本文整理汇总了Python中pyqtgraph.Qt.QtGui.QGridLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QGridLayout方法的具体用法?Python QtGui.QGridLayout怎么用?Python QtGui.QGridLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.Qt.QtGui
的用法示例。
在下文中一共展示了QtGui.QGridLayout方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initWindow
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def initWindow(self):
self.setWindowTitle('Real-time GCC-NMF')
self.mainWidget = QtGui.QWidget()
self.setCentralWidget(self.mainWidget)
self.backgroundColor = self.mainWidget.palette().color(QtGui.QPalette.Background)
self.borderColor = 'k'
self.mainWidget.setStyleSheet('QSplitter::handle {image: url(images/notExists.png); background-color: #D8D8D8}')
self.mainLayout = QtGui.QGridLayout()
self.mainWidget.setLayout(self.mainLayout)
self.mainWidget.setAutoFillBackground(True)
p = QtGui.QPalette(self.mainWidget.palette())
p.setColor(self.mainWidget.backgroundRole(), QtCore.Qt.black)
self.mainWidget.setPalette(p)
self.mainLayout.setContentsMargins(0, 0, 0, 0)
self.mainLayout.setSpacing(1)
示例2: __init__
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.ui = Ui_Form()
self.cw = QtGui.QWidget()
self.setCentralWidget(self.cw)
self.ui.setupUi(self.cw)
self.codeBtn = QtGui.QPushButton('Run Edited Code')
self.codeLayout = QtGui.QGridLayout()
self.ui.codeView.setLayout(self.codeLayout)
self.codeLayout.addItem(QtGui.QSpacerItem(100,100,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding), 0, 0)
self.codeLayout.addWidget(self.codeBtn, 1, 1)
self.codeBtn.hide()
global examples
self.itemCache = []
self.populateTree(self.ui.exampleTree.invisibleRootItem(), examples)
self.ui.exampleTree.expandAll()
self.resize(1000,500)
self.show()
self.ui.splitter.setSizes([250,750])
self.ui.loadBtn.clicked.connect(self.loadFile)
self.ui.exampleTree.currentItemChanged.connect(self.showFile)
self.ui.exampleTree.itemDoubleClicked.connect(self.loadFile)
self.ui.codeView.textChanged.connect(self.codeEdited)
self.codeBtn.clicked.connect(self.runEditedCode)
示例3: _init_gui
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def _init_gui(self):
self._my_layout = QtGui.QGridLayout()
self.slicingWidgets = {}
self.setLayout(self._my_layout)
self.setWindowTitle("Batch Viewer")
示例4: widget
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def widget(self):
w = QtGui.QWidget()
layout = QtGui.QGridLayout()
w.setLayout(layout)
layout.addWidget(self.OSC1.widget(), 0, 0)
layout.addWidget(self.OSC2.widget(), 1, 0)
layout.addWidget(self.OSC3.widget(), 2, 0)
layout.addWidget(self.Spec.widget(), 0, 1, 3, 1)
return w
示例5: widget
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def widget(self):
w = QtGui.QWidget()
layout = QtGui.QGridLayout()
w.setLayout(layout)
layout.addWidget(self.OSC1.widget(), 0, 0)
layout.addWidget(self.OSC2.widget(), 1, 0)
layout.addWidget(self.OSC3.widget(), 2, 0)
layout.addWidget(self.OSC4.widget(), 3, 0)
layout.addWidget(self.Spec.widget(), 0, 1, 3, 1)
layout.addWidget(self.DCOSC.widget(), 3, 1)
return w
示例6: widget
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def widget(self):
w = QtGui.QWidget()
layout = QtGui.QGridLayout()
w.setLayout(layout)
layout.addWidget(self.OSC1.widget(), 0, 0)
layout.addWidget(self.OSC2.widget(), 1, 0)
layout.addWidget(self.OSC3.widget(), 2, 0)
layout.addWidget(self.OSC4.widget(), 3, 0)
layout.addWidget(self.Spec.widget(), 0, 1, 4, 1)
return w
示例7: widget
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def widget(self):
w = QtGui.QWidget()
layout = QtGui.QGridLayout()
w.setLayout(layout)
layout.addWidget(self.RAWOSC1.widget(), 0, 0)
layout.addWidget(self.fftFilt.widget(), 2, 0)
return w
示例8: widget
# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QGridLayout [as 别名]
def widget(self):
w = QtGui.QWidget()
layout = QtGui.QGridLayout()
w.setLayout(layout)
layout.addWidget(self.OSC1.widget(), 0, 0)
layout.addWidget(self.OSC2.widget(), 1, 0)
layout.addWidget(self.OSC3.widget(), 2, 0)
layout.addWidget(self.Spec.widget(), 0, 1, 3, 3)
layout.addWidget(self.Lthr.widget(), 4, 1, 1, 1)
layout.addWidget(self.Tthr.widget(), 4, 2, 1, 1)
layout.addWidget(self.Hthr.widget(), 4, 3, 1, 1)
return w