pyqt labe界面超级链接例子学习

def bz(self):

self.lable1=QtGui.QLabel(u‘<br><a href=http://windows.microsoft.com/zh-cn/windows7/getting-help#section_1>帮助说明</a></br>‘

u‘<br><a href=http://support.microsoft.com/contactus/?ln=zh-cn>联系专区</a></br>‘

u‘<br><a href=http://support.microsoft.com/?ln=zh-cn>另类高级说明</a></br>‘

u‘<br><a href=help\\>本地文档说明(是为未连接internet用户准备的)</a></br>‘)

self.lable1.setWindowTitle(u‘帮助与支持‘)

self.lable1.resize(100,100)

self.lable1.setAlignment(QtCore.Qt.AlignLeading)

self.connect(self.lable1, QtCore.SIGNAL("linkActivated(QString)"),self.link_activated)

self.ui.l_e1.setText((u‘win系列帮助说明‘))

self.lable1.show()

def link_activated(self, link):

webbrowser.open(str(link))

时间: 2024-08-07 02:34:40

pyqt labe界面超级链接例子学习的相关文章

pyqt ColumnView, QFileSystemModel, QSplitter, QTreeView例子学习(由官方例子提供学习)

from PyQt4.QtGui import (QApplication, QColumnView, QFileSystemModel, QSplitter, QTreeView) #注意 """ QColumnView类提供了一个模型/视图列视图的实现,继承QAbstractItemView 提供了一个本地文件系统的数据模型,继承QAbstractItemModel 实现了一个分流器小部件,继承qframe 提供了一个默认的模型/视图树视图的实现,继承QAbstractI

pyqt menu子级方向例子学习

代码和UI文件:http://yunpan.cn/QCkXbX8mnSNke(提取码:51e1) 图片如: 代码如下: from PyQt4 import QtCore,QtGui,Qt import sys from a import Ui_MainWindow class A(QtGui.QMainWindow,Ui_MainWindow): def __init__(self,parnet=None): super(A,self).__init__(parnet) self.setupUi

pyqt QTableWidget例子学习(重点)

# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * lista = ['aa', 'ab', 'ac'] listb = ['ba', 'bb', 'bc'] listc = ['ca', 'cb', 'cc'] mystruct = {'A':lista, 'B':

pyqt 正则表达式例子学习

def rex01(self): username=QtCore.QRegExp('[a-zA-Z0-9_]{2,10}') self.names.setValidator(QtGui.QRegExpValidator(username,self)) mainname=QtCore.QRegExp("^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$") self.mains.setValidator(QtGui.QRegExpValidator(mainnam

pyqt QTimer,QThread例子学习

# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * from start import Ui_Form import sys class Example(QDialog,Ui_Form): def __init__(self,parent=None): super(E

pyqt单选,复选等例子学习

# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * from check1 import Ui_Dialog from check2 import Ui_Dialog1 from check3 import Ui_Dialog2 import sys QTextCod

pyqt columnView例子学习

# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import  * from PyQt4.Qt import * from PyQt4.QtCore import * import sys class Tree(QColumnView): def __init__(self,parnet=None,*args): super(Tree,self).__init__(parnet,

pyqt 托盘例子学习

# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from PyQt4.Qt import * from PyQt4.QtCore import * from tp import Ui_Form import sys from PyQt4.QtCore import Qt QTextCodec.setCodecForTr(QTextCodec.codecForNa

pyqt tabWidget例子学习1

from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT import sys class myTabWidget(QtGui.QTabWidget): def tabChangedSlot(self,argTabIndex): QtGui.QMessageBox.information(self,"Tab Index Changed!", "C