嗯,在這裏我有一個屏幕,我想在2-3秒後關閉。爲此我使用setDate()方法。使用setSeconds();關閉我的黑莓級聯閃屏
我對這個Blackberry Cascade QML編程非常新穎。我想附加1個更多的啓動畫面,所以出於這個原因,我想使用計時器按秒關閉和打開工作表。 任何幫助將不勝感激。
在此先感謝。
我已經在下面的代碼。
import bb.cascades 1.0
import bb.cascades.pickers 1.0
Page
{
Container
{
background: Color.Transparent
//Todo: fill me with QML
onCreationCompleted:
{
mysheet1.open();
new Date();
**Error is shown in for loop**
for(Date.setSeconds(1),Date.setSeconds()<=5 , Date.setSeconds()+1)
{
if(Date == 5)
{
mysheet1.closed();
mysheet2.open();
}
}
}
attachedObjects:
[
Sheet
{
id: mysheet1
peekEnabled: false
Page
{
Container
{
background: Color.Transparent
ImageView
{
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///splash1.png"
}
}
}
}
]
}
語境下可調用:日期日期(......)
Date對象用於處理日期和時間的工作。 使用新的Date()構造函數創建Date對象。 有四種啓動日期的方法: new Date()//當前日期和時間(或) 新日期(毫秒)//自1970/01/01(或)以來的毫秒數 new Date(dateString)(或) 新的日期(年,月,日,時,分,秒,毫秒)
可調用:數調用setSeconds(數秒)
設置Date對象的秒。