사용자가 응용 프로그램 아이콘을 클릭 할 때 시작 페이지를 표시하려고합니다. 이를 위해 시트를 만들고 페이지에 첨부했습니다. main.qml 작업 완료 후qml에서 시트를 닫는 방법?
import bb.cascades 1.0
Page {
Container {
Label {
text: "Home page"
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
}
}
attachedObjects: [
Sheet {
id: mySheet
content: Page {
Label {
text: "Splash Page/Sheet."
}
}
}
]//end of attached objects
onCreationCompleted: {
//open the sheet
mySheet.open();
//After that doing some task here.
---------
---------
---------
//Now I'm closing the Sheet. But the Sheet was not closed.
//It is showing the Sheet/Splash Page only, not the Home Page
mySheet.close();
}
}//end of page
, 나는 시트를 닫으려면. 그래서 close() 메서드를 호출했습니다.하지만 시트가 닫히지 않았습니다.
oncreationCompleted() 메서드 또는 C++ 메서드에서 시트를 닫으려면 어떻게해야합니까?
당신이''mySheet.close() 후/이전 로그를 넣어하려고 했나, 당신이 그것에 도달해야 할,''? –
예, 테스트 해본 결과 로그 메시지도 인쇄됩니다. – user2636874
작업 시간은 얼마나됩니까? 시트를 닫으려고해도 시트가 완전히 열리지 않았을 수 있습니다 (애니메이션이 종료되지 않았을 수 있음). –