Question

I'm using: Qt 5.2.1, Qt Creator 3.2.1

Using the designer mode inside the qt creator, I created two widgets: 1. Horizontal slider 2. Spin Box

Then using the Signal and Slots editor I did the following: 1. Sender: horizontal slider 2. signal: value changed 3. receiver: spinBox 4. slot: setValue

Then I built and ran the project and it worked the way I had expected it to. But in the files that qt shows in the left pane, there is no corresponding code for these two widgets though the widgets work fine when the project is run.

Where is the code corresponding to the widgets and the signals and slots that I created is located?

Was it helpful?

Solution

Usually there is a building folder beside your project which contains auto generated files.

For example, for a form with name MyForm.ui, it makes ui_MyForm.h that has connect commands corresponding to the signal/slots.

OTHER TIPS

The compiler generates the code from the form. In my case, my form is named dialog.ui and the generated file is named ui_dialog.h. You can find it in the ui folder under where the compiler builds your code. It'll be a different place depending on if you use shadow build or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top