本文整理汇总了Python中spyderlib.qt.QtGui.QLabel.setOpenExternalLinks方法的典型用法代码示例。如果您正苦于以下问题:Python QLabel.setOpenExternalLinks方法的具体用法?Python QLabel.setOpenExternalLinks怎么用?Python QLabel.setOpenExternalLinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spyderlib.qt.QtGui.QLabel
的用法示例。
在下文中一共展示了QLabel.setOpenExternalLinks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MemoryProfilerWidget
# 需要导入模块: from spyderlib.qt.QtGui import QLabel [as 别名]
# 或者: from spyderlib.qt.QtGui.QLabel import setOpenExternalLinks [as 别名]
#.........这里部分代码省略.........
hlayout1 = QHBoxLayout()
hlayout1.addWidget(self.filecombo)
hlayout1.addWidget(browse_button)
hlayout1.addWidget(self.start_button)
hlayout1.addWidget(self.stop_button)
hlayout2 = QHBoxLayout()
hlayout2.addWidget(self.collapse_button)
hlayout2.addWidget(self.expand_button)
hlayout2.addStretch()
hlayout2.addWidget(self.datelabel)
hlayout2.addStretch()
hlayout2.addWidget(self.log_button)
layout = QVBoxLayout()
layout.addLayout(hlayout1)
layout.addLayout(hlayout2)
layout.addWidget(self.datatree)
self.setLayout(layout)
self.process = None
self.set_running_state(False)
self.start_button.setEnabled(False)
if not is_memoryprofiler_installed():
for widget in (self.datatree, self.filecombo, self.log_button,
self.start_button, self.stop_button, browse_button,
self.collapse_button, self.expand_button):
widget.setDisabled(True)
text = _(
'<b>Please install the <a href="%s">memory_profiler module</a></b>'
) % WEBSITE_URL
self.datelabel.setText(text)
self.datelabel.setOpenExternalLinks(True)
else:
pass # self.show_data()
def analyze(self, filename, wdir=None, args=None, pythonpath=None,
use_colors=True):
self.use_colors = use_colors
if not is_memoryprofiler_installed():
return
self.kill_if_running()
#index, _data = self.get_data(filename)
index = None # FIXME: storing data is not implemented yet
if index is None:
self.filecombo.addItem(filename)
self.filecombo.setCurrentIndex(self.filecombo.count()-1)
else:
self.filecombo.setCurrentIndex(self.filecombo.findText(filename))
self.filecombo.selected()
if self.filecombo.is_valid():
if wdir is None:
wdir = osp.dirname(filename)
self.start(wdir, args, pythonpath)
def select_file(self):
self.emit(SIGNAL('redirect_stdio(bool)'), False)
filename, _selfilter = getopenfilename(
self, _("Select Python script"), getcwd(),
_("Python scripts")+" (*.py ; *.pyw)")
self.emit(SIGNAL('redirect_stdio(bool)'), False)
if filename:
self.analyze(filename)
def show_log(self):