PDA

View Full Version : control not passing from dialog to code



quickNitin
28th June 2006, 10:35
hello everybody
i have a dialog in which i have a checkbox and a few buttons. On press of ok button respective slot is called.I have used inherited this dialog code class and in my class, i have


connect(pbnOK,SIGNAL(clicked()),this,SLOT(on_pbnOK _clicked()));

what i expect here is on pressing on ok button( pbnOK) slot on_pbnOK_clicked() will be called but this is not happening.
While designing dialog i have made connection that on clicking of pbnOK should accept().
i know its very naive but i couldn't find way out

thankyou
cya
quick nitin

jacek
28th June 2006, 11:13
Are there any messages on the console? How did you define that slot? Is it in slots section? Do you have Q_OBJECT macro in your class definition?

quickNitin
28th June 2006, 11:25
there are no error message related to it. I established the fact that control is not coming to slot on_pbnOK_clicked() by use of gdb. I have used Q_OBJECT as well.

quickNitin
28th June 2006, 11:35
haah, i find a silly silly mistake.
by mistake i commented the code


public slots:


Problemm get solved after that.
thaks jacek for solving the issue.

cya
quick nitin