0
我需要創建一個ComponentC的ComponentA一個按鈕被點擊時動態的方法和ComponentC必須創建以componentB不可訪問通過ID從組件A。我需要一個ComponetA信號連接到另一個以componentB
那麼QML是如何實現的呢?
謝謝。
我需要創建一個ComponentC的ComponentA一個按鈕被點擊時動態的方法和ComponentC必須創建以componentB不可訪問通過ID從組件A。我需要一個ComponetA信號連接到另一個以componentB
那麼QML是如何實現的呢?
謝謝。
的信號可以返回被叫插槽返回的對象:
int B::slot() {
return 12;
}
void A::test() {
connect(this, SIGNAL(sig()), objectB, SLOT(slot());
int i = emit sig(); // i should be equal to 12
}
但是,我不知道這是否是一個預期的行爲...
對不起,我沒有提到我」 m只使用Qt QML模塊。 – SlimIT 2013-04-25 16:07:19