bazza
Posts: 21
Joined: Thu Apr 17, 2014 8:26 am

Qt5 - How to get started on Raspberry Pi

Thu Apr 17, 2014 8:41 am

I have cross-compiled Qt5 for the raspberry pi successfully using the various guides how ever I am having problems getting it working as I might expect (I have many years experience with Qt on X and Win32).

When I try to run the analogclock example I get a segmentation fault. If I run the hellowindow it works, but no keyboard.

Can anyone help point out where I am going wrong?

Regards

Bazza

Heater
Posts: 16860
Joined: Tue Jul 17, 2012 3:02 pm

Re: Qt5 - How to get started on Raspberry Pi

Thu Apr 24, 2014 4:29 am

Try using my Qt5.2 package for Raspian. It was compiled on the Pi. Took a while!

It can display directly to the frame buffer or an X window.

Package is here:https://dl.dropboxusercontent.com/u/812 ... .2-rpi.tgz

Some instructions are here: http://the.linuxd.org/qt-5-2-for-raspberry-pi
Memory in C++ is a leaky abstraction .

bazza
Posts: 21
Joined: Thu Apr 17, 2014 8:26 am

Re: Qt5 - How to get started on Raspberry Pi

Thu Apr 24, 2014 11:00 am

Thanks.

However the xcb platform plugin is missing, so X windows apps do not run.

Heater
Posts: 16860
Joined: Tue Jul 17, 2012 3:02 pm

Re: Qt5 - How to get started on Raspberry Pi

Thu Apr 24, 2014 2:18 pm

Hmmm, seems you are right xcb is missing. Must admit I did not test that as I never use X on the Pi.

It's odd because the build instructions I followed, see blog link, specifically include xcb support.

I cannot promise to try again as the build takes a long time and I don't have all my kit set up for it now.
Memory in C++ is a leaky abstraction .

bazza
Posts: 21
Joined: Thu Apr 17, 2014 8:26 am

Re: Qt5 - How to get started on Raspberry Pi

Sat Apr 26, 2014 10:57 am

I have got as far as getting XCB built with XCB-XKD support. It has to be done on the RPi, which then entails getting Xcb-proto and the build tools. Eventually I got Qt5 to build with XCB support.

But it fails to run under X, complaining about EGLConfig not found.

User avatar
topguy
Posts: 6788
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt5 - How to get started on Raspberry Pi

Sun Apr 27, 2014 9:49 pm

Did you specify "-platform xcb" ?

bazza
Posts: 21
Joined: Thu Apr 17, 2014 8:26 am

Re: Qt5 - How to get started on Raspberry Pi

Tue Apr 29, 2014 9:53 am

Thanks. Yes I did.

The root of the problem is the raspbian distribution does provide what is required by Qt5.2. Trying to fix it, quickly becomes a problem in tracking down more and more dependencies which even if they compile correctly they may not run correctly.

I will wait until Qt5 and wayland etc are all working together in the "standard" raspbian.

Because it is more important (to me) to get the same on the RPi as on the desktop I will avoid all the grief and use Qt4 for now, which builds and runs just fine with no problems. Qt2 also builds and runs easy, if you want a lean and mean GUI.

Heater
Posts: 16860
Joined: Tue Jul 17, 2012 3:02 pm

Re: Qt5 - How to get started on Raspberry Pi

Tue Apr 29, 2014 11:03 am

As far as I know you can install all of Qt5.2.1 Raspbian packages from here: http://twolife.be/raspbian/pool/test/

First add that repo to your sources.lst and install the key as per the instructions here.

No idea how well it works, I will probably try it out later today.
Memory in C++ is a leaky abstraction .

davethomaspilot
Posts: 116
Joined: Tue Apr 29, 2014 6:18 pm

Re: Qt5 - How to get started on Raspberry Pi

Wed Apr 30, 2014 1:47 pm

Heater,

Do you use QtCreator on the RPI with those 5.2 libraries? If so, where did you get it?

On the RPI I'm using Qt Creator 2.5.0 which is based on Qt 4.8.1. It's what got installed on Rasbian with apt-get and seems to work fine. But, can it be used with the Qt5.2 libraries to build Qt5 applications natively on the RPI?

I didn't think so, so I'm also trying to get a cross-compiled version. Used the directions here:

http://www.davidwdrell.net/wordpress/?page_id=316

But, turns out you can't get the necessary 32 bit run time libraries on the newer 64 bit Ubuntu releases. I couldn't find a work-around for that.

So, I tried using a 32 VMPlayer machine, with a 32 bit Ubuntu .iso. It got much farther--successfully configured qt5.2.1 and is now building.

I think that will get me a 5.2 QtCreator that will run on RPI, or I can run it on the virtual Ubuntu machine and cross compile my application.

Not sure what's the right way to go, native versus cross-compile. I do want to use QtCreator, I think.

Thanks,

Dave Thomas

Heater
Posts: 16860
Joined: Tue Jul 17, 2012 3:02 pm

Re: Qt5 - How to get started on Raspberry Pi

Thu May 01, 2014 4:40 am

I don't use creator on the Pi.

I develop on and for the PC and when things are looking good send the sources to the Pi and them a quick "qmake; make" builds them.

If you want to run creator on the Pi doesn't the deb package from here work: http://twolife.be/raspbian/pool/test/qtcreator/
Memory in C++ is a leaky abstraction .

davethomaspilot
Posts: 116
Joined: Tue Apr 29, 2014 6:18 pm

Re: Qt5 - How to get started on Raspberry Pi

Tue May 06, 2014 9:17 pm

The email for your reply got stuck in my spam folder--thanks for the reply, and sorry no response.

I've been using Qt4.8 with the QtCreator 2.5.0. I wasn't aware of the 3.0.1 version from http://twolife.be/raspbian/pool/test/qtcreator/

I'll give it a try!

Thanks,

Dave Thomas

Return to “C/C++”