Created
August 19, 2013 21:39
-
-
Save henryiii/6274508 to your computer and use it in GitHub Desktop.
pyqttemplate.py
This file contains hidden or 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\env python | |
from PyQt4 import QtCore, QtGui, uic | |
import sys | |
import os | |
Slot = QtCore.pyqtSlot | |
Signal = QtCore.pyqtSignal | |
LoadUI = uic.loadUi | |
if getattr(sys, 'frozen', None): | |
LOCDIR = sys._MEIPASS | |
else: | |
LOCDIR = os.path.dirname(__file__) | |
class MyClass(QtGui.QMainWindow): | |
def __init__(self): | |
super(MyClass,self).__init__() | |
# Set up the user interface from Designer. | |
LoadUI(os.path.join(LOCDIR,"MyFile.ui"), self) | |
self.setupUI() | |
self.show() | |
def setupUI(self): | |
pass | |
def main(): | |
app = QtGui.QApplication(sys.argv) | |
mainapp = MyClass() | |
app.exec_() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment