def __init__(self,parent=None):
super(myofd, self).__init__(parent)
print "Columns: ",self.layout().columnCount()
print "Rows: ",self.layout().rowCount()
print "At 3-0: ",self.layout().itemAtPosition(3,0)
self.layout().removeItem(self.layout().itemAtPosition(3,0))
cmbo.addItem("MyChoice1")
cmbo.addItem("MyChoice2")
self.layout().addWidget(cmbo,4,0)
self.layout().update()
self.layout().activate()
print "Columns: ",self.layout().columnCount()
print "Rows: ",self.layout().rowCount()
print "At 4-0: ",self.layout().itemAtPosition(4,0)
myloadinst = myofd()
myloadinst.getOpenFileName(self,"Open log file ...","","")
class myofd(QtGui.QFileDialog):
def __init__(self,parent=None):
super(myofd, self).__init__(parent)
print "Columns: ",self.layout().columnCount()
print "Rows: ",self.layout().rowCount()
print "At 3-0: ",self.layout().itemAtPosition(3,0)
self.layout().removeItem(self.layout().itemAtPosition(3,0))
cmbo = QtGui.QComboBox()
cmbo.addItem("MyChoice1")
cmbo.addItem("MyChoice2")
self.layout().addWidget(cmbo,4,0)
self.layout().update()
self.layout().activate()
print "Columns: ",self.layout().columnCount()
print "Rows: ",self.layout().rowCount()
print "At 4-0: ",self.layout().itemAtPosition(4,0)
myloadinst = myofd()
myloadinst.getOpenFileName(self,"Open log file ...","","")
To copy to clipboard, switch view to plain text mode
self.layout().addChildWidget(cmbo)
RuntimeError: no access to protected functions or signals for objects not created from Python
self.layout().addChildWidget(cmbo)
RuntimeError: no access to protected functions or signals for objects not created from Python
To copy to clipboard, switch view to plain text mode
Bookmarks