首页| 论坛| 消息

标题:debug connect() function
作者:freegnu
日期:2006-06-09 14:51
内容:

hi, every body. i modify the Tetrix game of the example and debug it by gdb.
but when the progame meets connet() function. i will invoke many strange such as QtGui4_dll_iname () etc
i read some paper about debug signal by gdb. but i still dont known how to debug the QT program, with connet() function.
is anyone give me and advice how to debug connet function? please say it mo detailed, im a newbie.
BTW:does anyone tell me more about signal/slot ?
for example:
connect(startButton, SIGNAL(clicked()), board, SLOT(start()));
how does connect() function do inside?
it send a signal when clicked() the startButton, but whats the signal and whats the
data stuct about the siganl? and is there a QT signal list ?
and how does SLOT() recevied the signal?
thanks


#1 [jerry_zhu 06-09 15:28]
You have the same question as when I was starting to read qt code.It is a good question though a little complicate. I think the three files below will help you a lot :
There will be some moc_*.cpp files if you use Q_OBJECT.
allmoc.cpp in qt/src dir.
qobject.cpp in qt/src dir ( connect())
Try to read them and find out the relationship between the signal/slot. And contact me if other questions. I'd like to discuss them with you.
#2 [菠萝 06-09 15:28]
你在start()处设断点,当有clicked事件发生的时候,程序会停在start()。
#3 [freegnu 06-10 19:21]
thanks to all, i have solved the problem. but i still not understand signal/slot mechanism clear , i will read the files that you mentioned
i will discuss with you when i meet any problems

回复 发表
主题 版块