本文整理汇总了Python中PyQt5.QtWidgets.QDockWidget.deleteLater方法的典型用法代码示例。如果您正苦于以下问题:Python QDockWidget.deleteLater方法的具体用法?Python QDockWidget.deleteLater怎么用?Python QDockWidget.deleteLater使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QDockWidget
的用法示例。
在下文中一共展示了QDockWidget.deleteLater方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Window
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import deleteLater [as 别名]
#.........这里部分代码省略.........
list_item.appendRow([
QStandardItem(str(i)),
QStandardItem(repr(i_val))
])
self.debug_model.appendRow([
list_item,
QStandardItem(_('(A list of {} items.)').format(len(val)))
])
elif isinstance(val, dict):
# Show a dict consisting of rows of key/value pairs.
dict_item = QStandardItem(name)
for k, k_val in val.items():
dict_item.appendRow([
QStandardItem(repr(k)),
QStandardItem(repr(k_val))
])
self.debug_model.appendRow([
dict_item,
QStandardItem(_('(A dict of {} items.)').format(len(val)))
])
else:
self.debug_model.appendRow([
QStandardItem(name),
QStandardItem(locals_dict[name]),
])
def remove_filesystem(self):
"""
Removes the file system pane from the application.
"""
if hasattr(self, 'fs') and self.fs:
self.fs_pane = None
self.fs.setParent(None)
self.fs.deleteLater()
self.fs = None
def remove_repl(self):
"""
Removes the REPL pane from the application.
"""
if self.repl:
self.repl_pane = None
self.repl.setParent(None)
self.repl.deleteLater()
self.repl = None
if not self.plotter:
self.serial = None
def remove_plotter(self):
"""
Removes the plotter pane from the application.
"""
if self.plotter:
self.plotter_pane = None
self.plotter.setParent(None)
self.plotter.deleteLater()
self.plotter = None
if not self.repl:
self.serial = None
def remove_python_runner(self):
"""
Removes the runner pane from the application.
"""
if hasattr(self, 'runner') and self.runner:
self.process_runner = None