Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from PySide import QtCore, QtGui, QtUiTools
- def loadUiWidget(uifilename, parent=None):
- loader = QtUiTools.QUiLoader()
- uifile = QtCore.QFile(uifilename)
- uifile.open(QtCore.QFile.ReadOnly)
- ui = loader.load(uifile, parent)
- uifile.close()
- return ui
- if __name__ == "__main__":
- import sys
- app = QtGui.QApplication(sys.argv)
- MainWindow = loadUiWidget("untitled.ui")
- MainWindow.show()
- sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement