本文整理汇总了Python中PyQt4.Qt.QGridLayout.setContentsMargins方法的典型用法代码示例。如果您正苦于以下问题:Python QGridLayout.setContentsMargins方法的具体用法?Python QGridLayout.setContentsMargins怎么用?Python QGridLayout.setContentsMargins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QGridLayout
的用法示例。
在下文中一共展示了QGridLayout.setContentsMargins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Footer
# 需要导入模块: from PyQt4.Qt import QGridLayout [as 别名]
# 或者: from PyQt4.Qt.QGridLayout import setContentsMargins [as 别名]
class Footer(QWidget):
def __init__(self):
QWidget.__init__(self)
self.__InitUi()
def __InitUi(self):
self.setFixedHeight(160)
SetWidgetBackgroundColor(COLOR_WIDGET_2, self)
self.__Layout = QGridLayout()
self.setLayout(self.__Layout)
self.__Layout.setContentsMargins(30,30,30,30)
self.__Layout.setHorizontalSpacing(30)
self.__Layout.setVerticalSpacing(30)
self.__lblProcess = LabelSmalSize("", COLOR_FONT_4, True)
self.__Layout.addWidget(self.__lblProcess)
self.__pgbProgress = Progressbar()
self.__Layout.addWidget(self.__pgbProgress)
def ProcessStartet(self, strProcess):
self.__lblProcess.setText(strProcess)
self.__pgbProgress.setMaximum(0)
def ProcessEnded(self):
self.__lblProcess.setText("")
self.__pgbProgress.setMaximum(100)
示例2: makeControlWidgets
# 需要导入模块: from PyQt4.Qt import QGridLayout [as 别名]
# 或者: from PyQt4.Qt.QGridLayout import setContentsMargins [as 别名]
def makeControlWidgets(self, parent):
"""Creates control widgets for the colormap's internal parameters.
"parent" is a parent widget.
Returns None if no controls are required"""
top = QWidget(parent)
layout = QGridLayout(top)
layout.setContentsMargins(0, 0, 0, 0)
for irow, icol, control in ((0, 0, self.gamma), (0, 1, self.color), (1, 0, self.cycles), (1, 1, self.hue)):
control.makeControlWidgets(top, layout, irow, icol)
QObject.connect(control, SIGNAL("valueChanged"), self.emitChange)
QObject.connect(control, SIGNAL("valueMoved"), self.emitPreview)
return top