Skip to content

Instantly share code, notes, and snippets.

@fereria
Created February 17, 2015 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/79626a479e914a41d9a3 to your computer and use it in GitHub Desktop.
Save fereria/79626a479e914a41d9a3 to your computer and use it in GitHub Desktop.
toPy Test
## -*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
from PySide.QtUiTools import QUiLoader
from testUI import Ui_Form
class testUI(QtGui.QDialog):
def __init__(self,parent=None):
QtGui.QDialog.__init__(self,parent)
self.ui = Ui_Form()
self.ui.setupUi(self)
self.ui.pushButton.clicked.connect(self.pushButton )
def pushButton(self,*args):
text = self.ui.lineEdit.text()
mBox = QtGui.QMessageBox()
mBox.setText(text)
mBox.exec_()
def main():
app = QtGui.QApplication(sys.argv)
QtCore.QTextCodec.setCodecForCStrings( QtCore.QTextCodec.codecForLocale() )
win = testUI()
win.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment