Reputation: 494
QtCreator 2.7.2 ,I use the Qt Creator design a connection and i can see it in the file *.ui ,but I can't find it in the generated file ui_*.h after build, where is it ? I'm curious.
Upvotes: 1
Views: 1373
Reputation: 111
The meta-object compiler (moc) generates the glue code for signals and slots. The UI editor just handles the connections and emits the necessary stuff to the ui file. Uic compiles these things into c++ headers which are then used my moc.
Upvotes: 0
Reputation: 22816
It's there, usually by the end of setupUi method. Just look better.
For instance, this chunk in the .ui
<connections>
<connection>
<sender>checkBox</sender>
<signal>toggled(bool)</signal>
<receiver>checkBox_2</receiver>
<slot>setChecked(bool)</slot>
</connection>
</connections>
Results in
QObject::connect(checkBox, SIGNAL(toggled(bool)), checkBox_2, SLOT(setChecked(bool)));
in the generated header.
Upvotes: 3