#-*-Coding: UTF-8 -*-
# Python: 2.x
_ Author _ = 'admin'
Import sys
From pyqt4.qtcore import QT
From pyqt4 import qtgui, qtcore, QT
From about import ui_form
Class Example (qtgui. qdialog, ui_form ):
Def _ init _ (self, parnet = none ):
Super (example, self). _ init _ (parnet)
Self. setupui (Self)
Self. Pushbutton. clicked. Connect (self. about1)
Self. pushbutton_2.clicked.connect (self. about2)
Def about2 (Self ):
Url = qtgui. qlabel (U' <a href = http://weibo.com/fangjiayu1107/home? WVR = 5 & LF = reg> Weibo online </a> ', self)
Abot_1 = qtgui. qmessagebox (Self)
Abot_1.setwindowtitle (u'about this tool and author ')
Abot_1.settext (U' this tool is a cainiao-level player made by pyqt4 software. \ N'
U' is made by cainiao with bugs. \ N \ t'
U' \ t is often modified during creation, \ N'
U'thank you for your support of this tool. \ N'
U '% s' % (URL. linkactivated. Connect (self. Openurl ))
)
Iconw.qtgui.qpixmap('a.jpg ')
Abot_1.seticonpixmap (icon)
Abot_1.show ()
Def Openurl (self, URL ):
Qtgui. qinitopservices. Openurl (qtcore. qurl (Unicode (URL )))
Def about1 (Self ):
ABC = qtgui. qmessagebox (Self)
ABC. setwindowtitle (u'hs ')
Abc.seticonpixmap(qtgui.qpixmap('a.jpg '))
Yes = ABC. addbutton (U' Yes ', qtgui. qmessagebox. actionrole)
ABC. settext (u'custom ')
Abc.exe C _()
Button = ABC. clickedbutton ()
If Button = Yes:
Print 'OK'
Self. Close ()
Def main ():
APP = qtgui. qapplication (SYS. argv)
Ex = example ()
Ex. Show ()
Sys.exit(app.exe C _())
Main ()
: