Created
November 11, 2011 11:47
-
-
Save opamp/1357823 to your computer and use it in GitHub Desktop.
PyQt_sample0
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
#!/usr/bin/python | |
#-*- encondig:utf-8 -*- | |
#pythonの実験で作ったやつ。pythonはわからんが. 単にQTextEditをMainWindowのセントラルウィジェットにしてMainWindowをshowしてるだけの簡単なもの。 | |
from PyQt4 import QtCore,QtGui | |
import sys,os | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self,parent=None): | |
super(QtGui.QMainWindow,self).__init__(parent) | |
self.mainwid = QtGui.QTextEdit() | |
self.setCentralWidget(self.mainwid) | |
if __name__ == "__main__": | |
app = QtGui.QApplication(sys.argv) | |
win = MainWindow() | |
win.setWindowTitle("Hello QTextEdit") | |
win.show() | |
sys.exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment