本文整理汇总了Python中properties.Properties.getAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python Properties.getAttribute方法的具体用法?Python Properties.getAttribute怎么用?Python Properties.getAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类properties.Properties
的用法示例。
在下文中一共展示了Properties.getAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UIParser
# 需要导入模块: from properties import Properties [as 别名]
# 或者: from properties.Properties import getAttribute [as 别名]
#.........这里部分代码省略.........
QtGui.QScrollArea, QtGui.QStackedWidget,
QtGui.QToolBox, QtGui.QTabWidget,
QtGui.QWizard)) or macMenu:
parent = None
# See if this is a layout widget.
if widget_class == 'QWidget':
if parent is not None:
if not isinstance(parent, QtGui.QMainWindow):
self.layout_widget = True
self.stack.push(self.setupObject(widget_class, parent, elem))
if isinstance(self.stack.topwidget, QtGui.QTableWidget):
self.stack.topwidget.setColumnCount(len(elem.findall("column")))
self.stack.topwidget.setRowCount(len(elem.findall("row")))
self.traverseWidgetTree(elem)
widget = self.stack.popWidget()
self.layout_widget = False
if isinstance(widget, QtGui.QTreeView):
self.handleHeaderView(elem, "header", widget.header())
elif isinstance(widget, QtGui.QTableView):
self.handleHeaderView(elem, "horizontalHeader",
widget.horizontalHeader())
self.handleHeaderView(elem, "verticalHeader",
widget.verticalHeader())
elif isinstance(widget, QtGui.QAbstractButton):
bg_i18n = self.wprops.getAttribute(elem, "buttonGroup")
if bg_i18n is not None:
bg_name = bg_i18n.string
for bg in self.button_groups:
if bg.objectName() == bg_name:
break
else:
bg = self.factory.createQObject("QButtonGroup", bg_name,
(self.toplevelWidget, ))
bg.setObjectName(bg_name)
self.button_groups.append(bg)
bg.addButton(widget)
if self.sorting_enabled is not None:
widget.setSortingEnabled(self.sorting_enabled)
self.sorting_enabled = None
if self.stack.topIsLayout():
lay = self.stack.peek()
gp = elem.attrib["grid-position"]
if isinstance(lay, QtGui.QFormLayout):
lay.setWidget(gp[0], self._form_layout_role(gp), widget)
else:
lay.addWidget(widget, *gp)
topwidget = self.stack.topwidget
if isinstance(topwidget, QtGui.QToolBox):
icon = self.wprops.getAttribute(elem, "icon")
if icon is not None: