Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bb.cascades 1.0
- import my.lib 1.0
- Page {
- content: Container{
- Label {
- id: timer_status;
- }
- }
- attachedObjects: [
- QTimer{
- id:my_timer
- interval: 3000
- //active: false
- onTimeout: {
- timer_status.text = "Timer stopped"
- stop();
- }
- }
- ]
- onCreationCompleted: {
- Application.fullscreen.connect(onFullscreen);
- }
- function onFullscreen() {
- my_timer.start()
- timer_status.text = "Timer started"
- }
- actions: [
- ActionItem {
- title: "Start timer";
- ActionBar.placement: ActionBarPlacement.OnBar;
- onTriggered: {
- timer_status.text = "Timer started"
- my_timer.start();
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement