I have solved my problem by myself. So if anyone has the same problem. Here is the way I found my solution and at the end (last line of text) the solution, which will probably work for the first tutorial, too.
I have tried again using this tutorial https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
So I have used Qt 5.7.0 in my current try. Because this caused errors during compile of some webengine stuff, i only compiled qtbase and qtmultimedia (using make module-qtbase and make module-qtmultimedia). Also you should use make install from the according sub directories.
However after getting that solution to work, I got the same error message from the first tutorial
PulseAudioService: pa_context_connect() failed
So I googled for that error message and found http://askubuntu.com/questions/70560/why-am-i-getting-this-connection-to-pulseaudio-failed-error#
In the answers and comments there I found the following comment:
ps. could you also post the result of 'cat /var/log/syslog | grep pulseaudio' – ovangle Nov 17 '11 at 9:51
In the log I found the following error:
org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
Googling after that error led me here: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=148395
And there I found this answer:
by spl23 » Mon May 16, 2016 9:11 pm
Officially, PulseAudio requires X to be running - a standard install of PulseAudio launches the pulseaudio daemon only when the desktop is launched.
If you want to use Pulse from a command-line without launching the desktop, you will need to start the daemon manually before you attempt to connect a Bluetooth device (type "pulseaudio -D" at the CLI prompt).
...
Using the command pulseaudio -D before starting my application solved the issue and now the sound is working.