I've solved this problem, and there is a new problem now.
Before native building qt on pi, I installed qt by: sudo apt-get install qt5-default, and other qt5 packages.
Although I have : sudo apt-get remove those packages, it may still works.
so I formatted the SD card and re-burned an Raspbian image, followed the instructions, "make", and the problem is gone.
but now I have another problem.
When I "make install", I get this error:
I guess you cross-compile on a host. I once tried to cross-compile a newer Qt version for Pi while my host had an older release installed. Although I tried to keep both source trees well separated, i never managed to get a successful build. Then I started from scratch with Qt5.6.2 for both host and Raspberry and everything went fine.
Probably you use unintentionally header and implementation files from different Qt versions.
Please double check you -sysroot in the configure command line and which sources are visible from where you execute configure.
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
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.
I have tried your source code. I am having waveshare 10" screen with raspberry pi. Which runs a kiosk qt application. When I touch on screen it returns me the following logs. here is the link for product http://www.waveshare.com/wiki/10.1inch_HDMI_LCD
@BruceNaylor Hmm that's interesting! I posted on the C++ Gurus forum and a couple guys there suggested I use the MinGW that gets installed with QT Creator (when you select that option) and that actually fixed my issue with registry keys. I was going to give cross compiling another try on Windows, maybe your fudges will fix some other issues I've into. I appreciate the suggestions!