function randomClicked()
{
QMessageBox.information(mywindow, qsTr("Something Happened"),
qsTr("The Random button was clicked."));
}
var btnDelete = mywindow.findChild("_delete");
var layout = toolbox.widgetGetLayout(btnDelete);
var newbutton = toolbox.createWidget("QPushButton", mywindow, "_scriptButton");
newbutton.text = qsTr("Random");
toolbox.layoutBoxInsertWidget(layout, -1, newbutton, 0, 0);
newbutton.clicked.connect(randomClicked);
| Generated on Thu Dec 9 09:13:16 2010 | xTuple ERP Programmer Reference, Version 3.6.0 |
1.6.1
|