메일 클라이언트에서 암호화 된 첨부 파일로 호출되는 일부 암호 해독 소프트웨어에 대한 UI가 있습니다.Blackberry Cascades에서 C++의 신호가있는 시트 닫기
내 컨트롤러 객체를 통과emit decryptedChanged();
합니다 (QML의 UI에 _encryptedattachmentencryptedattachment로 첨부 :
내 암호 해독 개체는 암호 해독의 성공적인 완료에 신호를 방출
connect(m_decryptor, SIGNAL(decryptedChanged()), this, SIGNAL(decryptedChanged()));
나는이 암호화 된 파일에서 호출시 표시되는 시트 : UI가 초기화 될 때 :
onCreationCompleted: {
splashscreen.open();
}
(시트가있는 attachedObjects 앞에서 TabbedPane 끝 부분에 있음)
신호를 기반으로 시트를 닫으려고합니다.
Sheet {
id: splashscreen
peekEnabled: false
Page {
Container {
layout: DockLayout {
}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
Label {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Center
text: "Decrypting..."
multiline: true
}
}
}
onCreationCompleted: {
_encryptedattachment.decryptedChanged.connect(splashscreen.onDecryptedChanged());
}
function onDecryptedChanged() {
splashscreen.close();
}
}
스플래시 화면이 닫히지 않습니다. 다른 속성을 사용하는 등 UI에서 객체를 볼 수 있다는 것을 알고 있습니다. QPROPERTY 같은 것이 누락 되었습니까?
업데이트 :
Q_INVOKABLE void decryptedChanged();
업데이트 다시 : 나는 QML 일부 console.logs을 추가 한
:
onCreationCompleted: {
_encryptedattachment.decryptedChanged.connect(splashscreen.onDecryptedChanged());
console.log("connected");
}
function onDecryptedChanged() {
console.log("closing");
splashscreen.close();
}
이 내 신호 정의
입니다
그러면 다음과 같은 결과가 나옵니다.
closing
connected
역순으로 표시되고 스플래시 화면이 닫히지 않습니다.
링크 된 코드가 작동하지 않는 것 같지 않습니다. 신호가 방출되고있는 것이 확실합니까? – Deadron
예, 방출하기 바로 전에 디버그 인쇄를 추가하고 인쇄했습니다. 상황이 일어나는 순서와 관련이있을 수 있습니까? –