2010-06-28 65 views
2

煥我想爲了使用私有對象的信號出現以下其父對象的信號,我做的:Qt信號 - 時隙交互。

1. I create a signal and a slot (named, let's say, ParentSignal, ParentSlot) 
2. connect(private_objcet, SIGNAL(someSignal()), this, SLOT(ParentSlot())); 
3. and define parent slot like this: 
void ParentSlot() 
{ 
    emit ParentSignal(); 
} 

有沒有辦法做到這一點的過程直接,也就是說,沒有ParentSlot?

+0

您可以連接信號信號:[http://doc.qt.nokia.com/4.7-snapshot/qobject.html#connect](http://doc.qt .nokia.com/4.7快照/ qobject.html#連接) – petraszd 2010-06-28 10:37:42

回答