當前位置: 首頁>>代碼示例>>Python>>正文


Python QtGui.QGridLayout方法代碼示例

本文整理匯總了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) 
開發者ID:seanwood,項目名稱:gcc-nmf,代碼行數:20,代碼來源:gccNMFInterface.py

示例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) 
開發者ID:SrikanthVelpuri,項目名稱:tf-pose,代碼行數:29,代碼來源:__main__.py

示例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") 
開發者ID:FabianIsensee,項目名稱:BatchViewer,代碼行數:7,代碼來源:batchviewer.py

示例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 
開發者ID:strfry,項目名稱:OpenNFB,代碼行數:14,代碼來源:emg.py

示例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 
開發者ID:strfry,項目名稱:OpenNFB,代碼行數:16,代碼來源:multiband.py

示例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 
開發者ID:strfry,項目名稱:OpenNFB,代碼行數:15,代碼來源:smr.py

示例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 
開發者ID:strfry,項目名稱:OpenNFB,代碼行數:11,代碼來源:ekg-drum.py

示例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 
開發者ID:strfry,項目名稱:OpenNFB,代碼行數:17,代碼來源:clear-windshield.py


注:本文中的pyqtgraph.Qt.QtGui.QGridLayout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。