plasma-framework/scriptengines/javascript/tests/script-digital-clock/contents/code/main.js

17 lines
357 B
JavaScript
Raw Normal View History

layout = new QGraphicsLinearLayout(Horizontal, plasmoid);
label = new Label();
plasmoid.dataEngine("time").connectSource("UTC", plasmoid, 500);
print(dataEngine("time").query("UTC").toString());
layout.addItem(label);
label.text = "test clock";
plasmoid.setLayout(layout);
plasmoid.dataUpdated = function(a, b)
{
print("This should print time");
}