Ui files and code files: http://yunpan.cn/QCktWsjsgRakf (extract code: d330)
For example:
The. py file code is as follows:
From a import ui_form
From B Import ui_form1
Import sys
From pyqt4.qtgui import *
From pyqt4.qtcore import *
From pyqt4.qt import *
Class exr02 (qdialog, ui_form ):
Def _ init _ (self, parent = none ):
Super (exr02, self). _ init _ (parent)
Self. setupui (Self)
Self. textnr ()
Self. Pushbutton. clicked. Connect (self. dianyong)
Def dianyong (Self ):
Self. YN = yn ()
Self. YN. Show ()
Def textnr (Self ):
Self. addlabel. settext ('Hello Python \ N'
'Hello QT \ N'
'Win7 64bit \ N'
'Python2. 7.8 \ N'
'Zh ')
Class yn (qdialog, ui_form1 ):
Def _ init _ (self, parnet = none ):
Super (YN, self). _ init _ (parnet)
Self. setupui (Self)
Self. Pushbutton. clicked. Connect (self. yesclose)
Self. pushbutton_2.clicked.connect (self. noclose)
Def yesclose (Self ):
Self. Close ()
Def noclose (Self ):
Pass
APP = qapplication ([])
E = exr02 ()
E. Show ()
Sys.exit(app.exe C _())
Pyqt button call example