Actually, might it be a problem that the QLayout object was created by C(++)? Wouldn't that mean any manipulation is impossible?
Because if I translate this: http://developer.qt.nokia.com/faq/an...ialog_instance line-by-line, it's not working either:
import sys
from PyQt4 import QtCore,QtGui
button.setText("New button")
layout = box.layout()
layout.addWidget(button, 0, 0)
box.show()
sys.exit(app.exec_())
import sys
from PyQt4 import QtCore,QtGui
app = QtGui.QApplication(sys.argv)
box = QtGui.QFileDialog()
button = QtGui.QPushButton(box)
button.setText("New button")
layout = box.layout()
layout.addWidget(button, 0, 0)
box.show()
sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode
(Actually, is line 8 correct? I don't speak C++)
Regards, Xaver
Bookmarks