One quick question, could you make your connection invalid, and check that in the debug output you get the right error message (something like qt::connect impossible to connect)
–
FezvezJun 15 '11 at 16:13

i don't get any error messages. that is why i am asking here. i don't understand why the signal is not emitting.
–
schmimonaJun 15 '11 at 18:01

In your ParentWidget class, do you have the Q_OBJECT macro? That can cause some oddities with connection problems.
–
Caleb Huitt - cjhuittJun 15 '11 at 20:28

The setupUi is in my code. I just forgot it above. I set the box as checked after the connect in my constructor and when the application opened it was checked. and in the debugger for connect it only says <invalid> and <unknown>. when i manually click the box on my Ui while debugging it doesn't do anything; it doesn't go to connect.
–
schmimonaJun 15 '11 at 18:29

The debugger won't go to connect. All connect does is establish a connection between a sender and receiver. Does connect succeed? If you add CONFIG += debug you should be able to step into most everything and see the event emitted.
–
Kaleb PedersonJun 15 '11 at 19:13

2

yes. it succeeds. i found the error. the exec function for the message box was missing.
–
schmimonaJun 15 '11 at 20:26

Hmm. Is it possible that the wrong element was mistakenly named setSelectionModeCheckBox in the ui designer? It's hard to guess without knowing a bit more about the application.
–
jpmJun 15 '11 at 16:12

it is an application where i draw. and I wanted this check box so that I can switch between drawing modes (if it is checked draw x if not draw y). that is the basic idea. i have only 1 check box in the application so I doubt there was some mistake with the name. I tried the debugger but the only time my application is accessing the connect statement is when it starts. after that no matter how many times i check and un-check the box it is not going in the connect mode. i also tried all the other signals (clicked, statechanged) but nothing seems to be working. and i really don't know why.
–
schmimonaJun 15 '11 at 16:41

Any chance you could put the code in a pastebin?
–
jpmJun 15 '11 at 16:49

i updated my question, although there is not that much difference. the only code related to the check box is above. do you want to see something specific?
–
schmimonaJun 15 '11 at 16:54

You should rather use the stateChanged() signal, emitted by the checkbox when its status changes. It gives you an integer, because checkboxes can also be tristate (but you can just use that int value as a boolean, in your case).

well,I often use the checkbox in the Dialog(settingDialog, selectionDialog,etc), so signal-slot is not need in this situation,just check the checkbox state when the "OK" button is clicked, and deal with it in the accept function.In your situation, I don't think checkbox is a good choice.