I also tried this on my Win7 machine but never succeeded. In the end I did a local compile on my RPi2 of Qt5.5. It compiled for 1041 minutes but is working nice now. I followed this guide for the local build. Instead of 5.4.1 I just got the latest source.
Could also be an option for you.
Welp, I'm VERY close at this point thanks to some helpful information on the ODROID forums (I am building using a Pi2 and an ODROID C1). At this point, I'm stumbling on Chromium, which the current set up seems to be setting it for a Linux desktop build running gyp_run.pro. The problem is that this causes the following error:
gyp name 'target_arch' is not defined while evaluating condition 'use_qt==1 and target_arch=="ia32"' in /home/flame/builds/qt5/qtwebengine/src/3rdparty/chromium/base/base.gyp
I'm still trying to solve the KHR issue on the Pi (despite already updating the header), but for now, the chromium situation is what has me in a gridlock. I can override the desktop build and instead recommend a cross compile in reference to itself, but I'm unsure as to how well this will go.
I am making documentation of what is going on so far so that I can relay an easier to follow guide for people who also are trying ot compile natively for the Pi.
I uses actually an eGalax 7" Touchscreen. Touch input inside of the QT Application is done by TSLIB, but an interaction with the desktop in the background is still there ... why ??? is there a way to fix this ?
But as you wrote, that using evdevtouch works, so you don't need this for now.
I didn't understand what you mean, what I don't need?
I mean, that you don't need overwrite QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS to ratate coordinates. Correct me if i'm wrong, but i assumed that, when you use evdevtouch plugin touchscreen works, as it should be? Unfortunately i don't know why it doesn't use evdevtouch by default.
Getting back to document conclusions of my research on best practice of using RaspiComm RS-485 under Qt for anybody, who finds this thread useful (I expect many of it is valid for RS-232 on same board as well, did not test myself):
Do not try to implement communication with MAX3140 UART chip yourself (maybe except of asm based implementation, what is however most probably unnecessary exertion). I succeeded to implement it based on kernel /dev/spidev0.0 only to find out that even this partially system driver supported solution is too slow for even 19 200 Bd speed (loosing about 5 characters on one received).
I myself feared about RaspiComm RS-485 driver /dev/ttyRPC0 based on some forums complaints and not clear versioning, however found out, that the forum thread was heavy outdated. These official installation instructions worked like a charm and the resulting driver worked out-of-box for my latest Raspbian Wheezy (4.1.7+ #817). So I strongly recommend to take this approach.
QSerialPort class has constructor with signature QSerialPort(const QString &, QObject *), where QString may contain even device which is not included in the QList that QSerialPortInfo::availablePorts() returns. This works with no surprise. If one does not set anything than (eventually) baud speed, one gets standard 8 bit, 1 stop bit, no parity without any character translations, good old plain raw binary. So QSerialPort may be used with /dev/ttyRPC0 directly and easily.
rpc0.write("Binary request\0even\xffcontaining weird\x03characters", length_of_binary);
if(rpc0.waitForReadyRead(100)) // Enough long time in miliseconds
QByteArray data = rpc0.readAll(); // You may have to wait/read repetitively in loop
// and merge data on higher link speeds
Hardware of RaspiComm uses RTS pin to select in/out direction of data. CTS is kept active permanently by wiring, so using default use RTS/CTS mode works properly with no inappropriate blocking.
That's all you should need, so enjoy your communication.
I make some tests:
The values are computed on int32 instead of uint64.
I have the same problem on RPI2 and on ubuntu.
If I return the values to another function, the values are computed correctly. I hope the problem won't come back.
You have Mesa's EGL headers in /usr/include which get picked up in place of the Broadcom ones. This is not necessarily fatal but you need to add DEFINES += MESA_EGL_NO_X11_HEADERS in qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro
Got another problem though I have managed to cross compile Qt5 with gstreamer1.0 support it is unable to play HD videos on pi.
I checked using GST_DEBUG=3 and it seems like it still uses gstreamer0.10.
So Do anyone have got HD video playing on pi and can suggest me to get it playing??
Perfect, you have understood perfectly.
For me is very important to find the solution. If not I must downgrade from Qt Quick to Qt Widgets.
The others OpenGL ES applications (mot based on Qt) seem to work perfectly.
@FlorianB I'm trying to install qtcreator on a system that I don't have admin rights on. so:
Install qt from source as I need the latest
Works fine, but as mentioned in your posts I manually did make install in qt5/qttools/src/designer/src/ lib, components, designer folder. Is there something else that I'm missing. I install qt to a prefix and set it as path.
Installing qtcreator, qmake step works fine. I get the error (This is with current master Oct 7 2015):
In file included from ../../../../qt-creator/src/libs/utils/shellcommand.cpp:31:0:
../../../../qt-creator/src/libs/utils/shellcommand.h:118:19: error: expected ‘;’ at end of member declaration
../../../../qt-creator/src/libs/utils/shellcommand.h:118:21: error: ‘override’ does not name a type
../../../../qt-creator/src/libs/utils/shellcommand.cpp:90:84: sorry, unimplemented: non-static data member initializers
../../../../qt-creator/src/libs/utils/shellcommand.cpp:90:84: error: in-class initialization of static data member ‘m_proxyFactory’ of non-literal type
../../../../qt-creator/src/libs/utils/shellcommand.cpp: In member function ‘virtual Utils::SynchronousProcessResponse Utils::ShellCommand::runCommand(const Utils::FileName&, const QStringList&, int, const QString&, Utils::ExitCodeInterpreter*)’:
../../../../qt-creator/src/libs/utils/shellcommand.cpp:338:42: error: ‘class Utils::Internal::ShellCommandPrivate’ has no member named ‘m_proxyFactory’
../../../../qt-creator/src/libs/utils/shellcommand.cpp: In member function ‘Utils::SynchronousProcessResponse Utils::ShellCommand::runSynchronous(const Utils::FileName&, const QStringList&, int, const QString&, Utils::ExitCodeInterpreter*)’:
../../../../qt-creator/src/libs/utils/shellcommand.cpp:419:42: error: ‘class Utils::Internal::ShellCommandPrivate’ has no member named ‘m_proxyFactory’
../../../../qt-creator/src/libs/utils/shellcommand.cpp: In member function ‘virtual bool Utils::ShellCommand::runFullySynchronous(const Utils::FileName&, const QStringList&, int, QByteArray*, QByteArray*, const QString&)’:
../../../../qt-creator/src/libs/utils/shellcommand.cpp:482:42: error: ‘class Utils::Internal::ShellCommandPrivate’ has no member named ‘m_proxyFactory’
../../../../qt-creator/src/libs/utils/shellcommand.cpp: In member function ‘void Utils::ShellCommand::setOutputProxyFactory(const std::functionUtils::OutputProxy*()&)’:
../../../../qt-creator/src/libs/utils/shellcommand.cpp:547:8: error: ‘class Utils::Internal::ShellCommandPrivate’ has no member named ‘m_proxyFactory’
make: *** [.obj/debug-shared/shellcommand.o] Error 1
make: Leaving directory /nfs2/jain/qt-creator-build/src/libs/utils' make: *** [sub-utils-make_first] Error 2 make: Leaving directory/nfs2/jain/qt-creator-build/src/libs'
make: *** [sub-libs-make_first-ordered] Error 2
make: Leaving directory `/nfs2/jain/qt-creator-build/src'
make: *** [sub-src-make_first-ordered] Error 2
So....after running into more problems with the other online tutorials, I went back to the original Qt wiki tutorial. When I first looked at it months back, I couldnt follow it through, so I looked for other ways. This time, I was able to understand and navigate through the steps. I can now cross compile Qt programs from my Windows PC!
I used Ubuntu in VirtualBox, with a Raspbian image mounted! (Raspbian->Ubuntu->Windows)->Raspbian
Thanks for the help here on the forums. Its been months of reading and learning about linux.
For anyone who wants to do the same, you can contact me.
I did notice two things not mentioned on the wiki page.
First, that there was a path error. Wherever it uses "/mnt/rasp-pi-rootfs", it should be "~/opt/mnt/rasp-pi-rootfs"
I wouldnt have known how to spot the error or how to fix it without the arduous process of learning linux.
Second, after you unmount the root filesystem after cross compiling Qt5 and put it onto the SD card, the Raspberry will not boot. Dont worry, just do what it asks:
password, then type "fsck"