Lastly I've studied the Audiorecorder example of QtCreator (http://qt-project.org/doc/qt-5/qtmultimedia-audiorecorder-example.html). There is a record-button that starts the recording after clicking it. But I could not find code like
connect(ui->recordButton, SIGNAL(clicked()), this, SLOT(toggleRecord()));
or something similar. I don't understand why the recorder knows that I clicked the button. So I also can't adapt this button to my needs. Are there any other ways to connect a button to a function invisible, or did I just overlook it? I've heard something about meta objects moc-files, is this somehow related? If yes, how could I remove or change that and implement "normal" connections?
The connection can also be created in a
*.ui
-file. If you inspect theaudiorecorder.ui
you'll find the following code:which you can either adapt or remove completly and create the
connect()
statement you wrote in theAudioRecorder
constructor.