• 5030阅读
  • 3回复

debug connect() function [复制链接]

上一主题 下一主题
离线freegnu
 

只看楼主 倒序阅读 楼主  发表于: 2006-06-09
debug connect() function
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
[ 此贴被XChinux在2006-06-09 18:29重新编辑 ]
离线jerry_zhu
只看该作者 1楼 发表于: 2006-06-09
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楼 发表于: 2006-06-09
你在start()处设断点,当有clicked事件发生的时候,程序会停在start()。
蓬山此去无多路,青鸟殷勤为探看。
离线freegnu

只看该作者 3楼 发表于: 2006-06-10
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
快速回复
限100 字节
 
上一个 下一个