本文整理汇总了Python中guidata.qt.QtGui.QWidget.setLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QWidget.setLayout方法的具体用法?Python QWidget.setLayout怎么用?Python QWidget.setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类guidata.qt.QtGui.QWidget
的用法示例。
在下文中一共展示了QWidget.setLayout方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from guidata.qt.QtGui import QWidget [as 别名]
# 或者: from guidata.qt.QtGui.QWidget import setLayout [as 别名]
def __init__(self, manager, parent=None):
QSplitter.__init__(self, Qt.Horizontal, parent)
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.manager = manager
self.plots = []
self.itemlist = None
main = QWidget()
self.plotlayout = QGridLayout()
main.setLayout(self.plotlayout)
self.addWidget(main)
示例2: __init__
# 需要导入模块: from guidata.qt.QtGui import QWidget [as 别名]
# 或者: from guidata.qt.QtGui.QWidget import setLayout [as 别名]
def __init__(self):
QMainWindow.__init__(self)
self.setWindowTitle("Signal filtering 2 (guiqwt)")
self.setWindowIcon(get_icon('guiqwt.svg'))
hlayout = QHBoxLayout()
central_widget = QWidget(self)
central_widget.setLayout(hlayout)
self.setCentralWidget(central_widget)
#---guiqwt plot manager
self.manager = PlotManager(self)
示例3: __init__
# 需要导入模块: from guidata.qt.QtGui import QWidget [as 别名]
# 或者: from guidata.qt.QtGui.QWidget import setLayout [as 别名]
def __init__(self, manager, parent=None, **kwargs):
super(SubplotWidget, self).__init__(parent, **kwargs)
self.setOrientation(Qt.Horizontal)
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.manager = manager
self.plots = []
self.itemlist = None
main = QWidget()
self.plotlayout = QGridLayout()
main.setLayout(self.plotlayout)
self.addWidget(main)
示例4: setup_instance
# 需要导入模块: from guidata.qt.QtGui import QWidget [as 别名]
# 或者: from guidata.qt.QtGui.QWidget import setLayout [as 别名]
def setup_instance(self, instance):
"""Override DataSetEditDialog method"""
from guidata.dataset.datatypes import DataSetGroup
assert isinstance(instance, DataSetGroup)
tabs = QTabWidget()
# tabs.setUsesScrollButtons(False)
self.layout.addWidget(tabs)
for dataset in instance.datasets:
layout = QVBoxLayout()
layout.setAlignment(Qt.AlignTop)
if dataset.get_comment():
label = QLabel(dataset.get_comment())
label.setWordWrap(self.wordwrap)
layout.addWidget(label)
grid = QGridLayout()
self.edit_layout.append( self.layout_factory(dataset, grid) )
layout.addLayout(grid)
page = QWidget()
page.setLayout(layout)
if dataset.get_icon():
tabs.addTab( page, get_icon(dataset.get_icon()),
dataset.get_title() )
else:
tabs.addTab( page, dataset.get_title() )
示例5: setup_widget_layout
# 需要导入模块: from guidata.qt.QtGui import QWidget [as 别名]
# 或者: from guidata.qt.QtGui.QWidget import setLayout [as 别名]
def setup_widget_layout(self):
self.addToolBar(self.toolbar)
widget = QWidget()
widget.setLayout(self.plot_layout)
self.setCentralWidget(widget)