本文整理汇总了Python中PyQt4.Qt.QScrollArea.takeWidget方法的典型用法代码示例。如果您正苦于以下问题:Python QScrollArea.takeWidget方法的具体用法?Python QScrollArea.takeWidget怎么用?Python QScrollArea.takeWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QScrollArea
的用法示例。
在下文中一共展示了QScrollArea.takeWidget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_PartWindow
# 需要导入模块: from PyQt4.Qt import QScrollArea [as 别名]
# 或者: from PyQt4.Qt.QScrollArea import takeWidget [as 别名]
#.........这里部分代码省略.........
self.setWindowModified(changed)
return
def collapseLeftArea(self):
"""
Collapse the left area.
"""
self._previous_pwLeftAreaWidth = self.pwLeftArea.width()
self.pwLeftArea.setFixedWidth(0)
self.pwSplitter.setMaximumWidth(self.pwLeftArea.width())
def expandLeftArea(self):
"""
Expand the left area.
@see: L{MWsemantics._showFullScreenCommonCode()} for an example
showing how it is used.
"""
if self._previous_pwLeftAreaWidth == 0:
self._previous_pwLeftAreaWidth = PM_DEFAULT_WIDTH
self.pwLeftArea.setMaximumWidth(
self._previous_pwLeftAreaWidth)
self.pwSplitter.setMaximumWidth(self.pwLeftArea.width())
def updatePropertyManagerTab(self, tab): #Ninad 061207
"Update the Properties Manager tab with 'tab' "
self.parent.glpane.gl_update_confcorner()
#bruce 070627, since PM affects confcorner appearance
if self.propertyManagerScrollArea.widget():
# The following is necessary to get rid of those C object
# deleted errors (and the resulting bugs)
lastwidgetobject = self.propertyManagerScrollArea.takeWidget()
if lastwidgetobject:
# bruce 071018 revised this code; see my comment on same
# code in PM_Dialog
try:
lastwidgetobject.update_props_if_needed_before_closing
except AttributeError:
if 1 or debug_flags.atom_debug:
msg1 = "Last PropMgr %r doesn't have method" % lastwidgetobject
msg2 =" update_props_if_needed_before_closing. That's"
msg3 = " OK (for now, only implemented for Plane PM). "
msg4 = "Ignoring Exception: "
print_compact_traceback(msg1 + msg2 + msg3 + msg4)
else:
lastwidgetobject.update_props_if_needed_before_closing()
lastwidgetobject.hide()
# @ ninad 061212 perhaps hiding the widget is not needed
self.pwProjectTabWidget.removeTab(
self.pwProjectTabWidget.indexOf(self.propertyManagerScrollArea))
# Set the PropertyManager tab scroll area to the appropriate widget.
self.propertyManagerScrollArea.setWidget(tab)
self.pwProjectTabWidget.addTab(
self.propertyManagerScrollArea,
geticon("ui/modeltree/Property_Manager.png"),
"")
self.pwProjectTabWidget.setCurrentIndex(
self.pwProjectTabWidget.indexOf(self.propertyManagerScrollArea))