Created
February 17, 2015 15:08
-
-
Save fereria/79626a479e914a41d9a3 to your computer and use it in GitHub Desktop.
toPy Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -*- 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