import sys
from PyQt4 import QtCore,QtGui,uic
form_class, base_class = uic.loadUiType("unnamed.ui")
class MyWidget
(QtGui.
QWidget, form_class
): def __init__(self,parent=None,selected=[],flag=0,*args):
QtGui.
QWidget.__init__
(self,parent,
*args
) self.setupUi(self)
if __name__ == '__main__':
form = MyWidget(None)
form.show()
app.exec_()
import sys
from PyQt4 import QtCore,QtGui,uic
form_class, base_class = uic.loadUiType("unnamed.ui")
class MyWidget (QtGui.QWidget, form_class):
def __init__(self,parent=None,selected=[],flag=0,*args):
QtGui.QWidget.__init__(self,parent,*args)
self.setupUi(self)
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
form = MyWidget(None)
form.show()
app.exec_()
To copy to clipboard, switch view to plain text mode
Try this little script with your ui file.
Bookmarks