本文整理汇总了Python中PyQt5.QtWidgets.QDockWidget.setParent方法的典型用法代码示例。如果您正苦于以下问题:Python QDockWidget.setParent方法的具体用法?Python QDockWidget.setParent怎么用?Python QDockWidget.setParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QDockWidget
的用法示例。
在下文中一共展示了QDockWidget.setParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Window
# 需要导入模块: from PyQt5.QtWidgets import QDockWidget [as 别名]
# 或者: from PyQt5.QtWidgets.QDockWidget import setParent [as 别名]
#.........这里部分代码省略.........
for i, i_val in enumerate(val):
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: