You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/kjsembed/docs/embedding/simple-embed/test.js

38 lines
868 B

#!/usr/bin/env kjsembed
CustomOptions.orientation = Qt.Vertical;
CustomOptions.columns = 1;
var box = new QVBox(CustomOptions);
var row1 = new QHBox(box);
var dateLabel = new QLabel(row1);
dateLabel.text = "Birthday:";
var birthday = new KDateWidget(row1);
var row2 = new QHBox(box);
var eyeLabel = new QLabel(row2);
eyeLabel.text = "Eye color:";
var eyeColor = new KColorButton(row2);
var row3 = new QHBox(box);
var notes = new KTextEdit(row3);
box.show();
function handleOk()
{
var personelData = []; // make this an array so it will convert properly
personelData = {birthday:birthday.date, eyeColor:eyeColor.color, notes:notes.text };
// personelData[birthday] = birthday.date;
// personelData[eyeColor] = eyeColor.color;
// personelData[notes] = notes.text;
return personelData;
}
function handleCancel()
{
notes.text = "";
}