Miladkt
Posts: 4
Joined: Thu Aug 27, 2015 5:50 pm

Install Qt5 On Raspberry Pi2

Tue Sep 01, 2015 8:32 pm

Hi
please help me
how can Install Qt5 On Raspberry Pi2?
how can Install Qt creator On raspberry Pi2?
how can work with after install?
please
complete explain

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

Re: Install Qt5 On Raspberry Pi2

Wed Sep 02, 2015 5:08 am

how can Install Qt5 On Raspberry Pi2?
how can Install Qt creator On raspberry Pi2?
Use the qt5 packages for Raspbian here:
https://twolife.be/raspbian/

Do ask if you do not know how to install packages from there.
how can work with after install?
Same as you do on a PC.

tksaha
Posts: 5
Joined: Sat Oct 03, 2015 9:30 am

Re: Install Qt5 On Raspberry Pi2

Sat Oct 03, 2015 9:41 am

As per the repository https://twolife.be/raspbian/, I edited /etc/apt/sources.list to include
deb https://twolife.be/raspbian/ wheezy main backports
deb-src https://twolife.be/raspbian/ wheezy main backports

and then
sudo apt-get update

Actually, I do not know how to install packages from there.
Please tell me what's next to install qt5?

Thanks in advance.

tksaha
Posts: 5
Joined: Sat Oct 03, 2015 9:30 am

Re: Install Qt5 On Raspberry Pi2

Mon Oct 05, 2015 3:24 am

By sudo apt-get install qtcreator I have installed qt5. But it is not properly configured. I could not find qmake either.
Can any one help to make qt5 working?

fruitoftheloom
Posts: 20198
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Install Qt5 On Raspberry Pi2

Mon Oct 05, 2015 5:45 am

tksaha wrote:As per the repository https://twolife.be/raspbian/, I edited /etc/apt/sources.list to include
deb https://twolife.be/raspbian/ wheezy main backports
deb-src https://twolife.be/raspbian/ wheezy main backports

and then
sudo apt-get update

Actually, I do not know how to install packages from there.
Please tell me what's next to install qt5?

Thanks in advance.
If you are using Raspbian Jessie QT5 & Creator are in the Repository, see:

viewtopic.php?f=33&t=122267
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

tksaha
Posts: 5
Joined: Sat Oct 03, 2015 9:30 am

Re: Install Qt5 On Raspberry Pi2

Mon Oct 05, 2015 2:38 pm

Qt5 can be installed from default Jessie repository, but it does not have any kit. No qmake either. Has any body installed and used it? Then please let us know what else to do.

fruitoftheloom
Posts: 20198
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Install Qt5 On Raspberry Pi2

Mon Oct 05, 2015 2:46 pm

tksaha wrote:Qt5 can be installed from default Jessie repository, but it does not have any kit. No qmake either. Has any body installed and used it? Then please let us know what else to do.
,

Code: Select all

apt-get install qt5-qmake
viewtopic.php?f=33&t=122267
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

Lloyd.J
Posts: 5
Joined: Mon Feb 29, 2016 7:31 pm

Re: Install Qt5 On Raspberry Pi2

Wed Mar 02, 2016 12:14 pm

Hi all,

Sorry for dragging this thread back up!

I'm trying to install QT , and have added the relevant info to the sources.list however, I am getting errors as I try sudo apt-get update.

Any ideas where to start?

Lloyd

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

Re: Install Qt5 On Raspberry Pi2

Wed Mar 02, 2016 10:48 pm

If you had started by showing us those errors exactly it would have been very easy to help.

You might not have installed the apt-transport-https package which is needed..

Code: Select all

sudo apt-get update
sudo apt-get -y --force-yes dist-upgrade
sudo apt-get -y --force-yes install apt-transport-https

# Add the twolife.be repository.
sudo bash -c 'cat << EOF > /etc/apt/sources.list.d/twolife.list
# Raspbian Jessie (stable)
deb https://twolife.be/raspbian/ jessie main qt
deb-src https://twolife.be/raspbian/ jessie main qt
EOF'

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 2578B775
NB!!
The files from this repo works with "eglfs" rendring which the packages in Raspian does not. If you plan to use Qt5 in the desktop environment you *dont need* to install from twolife.be you can just install the ones in Raspbian.

!!Warning!!
The last times I have used this repo, it upgrades the raspberrypi firmware and kernel in a way that breaks booting.
I havent so far had time to check which packages to avoid upgrading. You can either take a backup of all the files in "/boot" and put them back if the card refuses to boot after installation. If this sounds daunting or you dont want to risk having to reinstalling the sd-card from scratch ( always take backup of files you dont want to loose ) then use the packages in Raspbian.

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

Re: Install Qt5 On Raspberry Pi2

Thu Mar 03, 2016 3:33 am

DO NOT USE TWOLIFE.

Since we now have Raspbian Jessie for the Pi we can just install Qt5 and qtcreator from it's normal repos. Get Jessie onto your Pi if you are still using Wheezy.

Code: Select all

$ sudo apt-get update --fix-missing
$ sudo apt-get upgrade
$ sudo apt-get install qtcreator
$ qmake -v
QMake version 3.0
Using Qt version 5.3.2 in /usr/lib/arm-linux-gnueabihf
[email protected]:~ $ke 

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

Re: Install Qt5 On Raspberry Pi2

Thu Mar 03, 2016 1:02 pm

Heater wrote:DO NOT USE TWOLIFE.
Unless you want fullscreen hw-accellerated Qt-gui without X-windows that is.... or need Qt5.5 instead of Qt5.3.. or..

People should start with the official packages anyway. Using external repo's are for advanced users who know the risks.

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

Re: Install Qt5 On Raspberry Pi2

Thu Mar 03, 2016 1:25 pm

Very true topguy. That is why I compiled Qt5.3 (Whatever it was) from source a year of so ago.

aniketgadekar
Posts: 1
Joined: Tue Nov 15, 2016 11:12 am

Re: Install Qt5 On Raspberry Pi2

Tue Nov 15, 2016 11:14 am

Follow steps:
1. sudo apt-get install qt5-default
2. sudo apt-get install qtcreator

Enjoy...

tksaha
Posts: 5
Joined: Sat Oct 03, 2015 9:30 am

Re: Install Qt5 On Raspberry Pi2

Thu Nov 17, 2016 4:26 am

It it still Qt5.3? I need to use some QML libraries, which require Qt5.6 or above. Is higher version of Qt available?

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

Re: Install Qt5 On Raspberry Pi2

Thu Nov 17, 2016 1:39 pm

I have used a second repository from https://twolife.be/raspbian/ but it is only up to 5.5.1 at the moment. Compiling yourself is an option, or check what is available in beta repository of "Rasbian Stretch".

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

Re: Install Qt5 On Raspberry Pi2

Thu Nov 17, 2016 4:03 pm

Be aware that installing the packages from twolife may well mess up you system totally and is a security hazard. Rather like down loading and running random executables on Windows.

Ages ago I had success building Qt 5 from sources on Wheezy using the instructions here: http://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi
which have since been updated here:
http://wiki.qt.io/Native_Build_of_Qt_5. ... spberry_Pi

I have not tried it yet myself but I suspect that still works. It has some updates for Jessie.

It says Qt 5.4.1 but I'd try it using whatever the latest sources are.

synapticvoid
Posts: 1
Joined: Tue Nov 22, 2016 9:12 am

Re: Install Qt5 On Raspberry Pi2

Tue Nov 22, 2016 9:18 am

Hi Miladkt,

We created a tool named qtrpi to automate the Qt cross-compilation on a Raspberry Pi. Maybe these scripts could help you to have a running Qt on your Raspberry Pi.

There are 2 possible use cases for qtrpi:
  • qtrpi-full, in which everything is built automatically on your host machine (sysroot, Qt)
    qtrpi-minimal, in which you download a ready-to-use sysroot with pre-compiled Qt binaries
Overall, you only have to export a couple of environment variables (to select your version of Raspberry Pi / version of Qt) and execute a bash script.

When qtrpi (full or minimal) is ready on your host machine, we also provide a script that installs Qt on your Raspberry Pi.

Today, we support the Raspberry Pi 1, 2 and 3 and provide Qt 5.6 / 5.7 for each Raspberry Pi. If you are interested, here are a few links: Note that for now, the prebuilt version (minimal) is targeted to a 64-bit linux host, if your machine is on a 32-bit system, you'll have to use the full version and recompile everything.

If you have any questions / remarks, we would gladly discuss them with you, we want to improve this tool and make Qt easy to use on embedded platforms.

Aros
Posts: 32
Joined: Tue Apr 28, 2015 9:08 am

Re: Install Qt5 On Raspberry Pi2

Thu Feb 22, 2018 9:12 pm

Hello,

resurrecting the thread again...

I need to ask this very basic question that I was not able to conclusively answer by reading dozens of posts on both Raspberry and QT forums...

So is it currently possible to run QT eglfs on Raspbian stretch from the default source? I mean, qt5 is surely there but I am not sure I can run it as eglfs.

If not, is it possible to run twolife's version on stretch with eglfs? The fact that he actually has a stretch version suggests that yes, but in fact, I had no luck.

I have tried both official packages and twolifes packages, but with no luck.

The official ones claim that
Could not find DRM device!
even after QT_QPA_PLATFORM=eglfs
Twolife's after several workarounds like making symlinks to the original library names and disabling vc4-kms-v3d and several others just crash with segmentation fault.

I have succesfully used twolife's binaries on both wheezy and jessie, but I am at my wits end with stretch...

Aros
Posts: 32
Joined: Tue Apr 28, 2015 9:08 am

Re: Install Qt5 On Raspberry Pi2

Sat May 04, 2019 7:53 am

Any update on this? I tried it again, and still no luck... I took a clean stretch lite image, installed twolife's binaries and was able to build. When I however try to run the app, I get segmentation fault. I am able to run the same project on jessie with twolife's jessie binaries with no problem...

swampdog
Posts: 221
Joined: Fri Dec 04, 2015 11:22 am

Re: Install Qt5 On Raspberry Pi2

Sat May 04, 2019 8:35 am

It's "do-able". I have QT 5.12.1 built and QtCreator 4.8.1. Works fine.

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

Re: Install Qt5 On Raspberry Pi2

Sat May 04, 2019 10:15 am

Aros,

I advise against using twolife's packages. Firstly last time I checked they were out of date, not suitable for Stretch. Secondly it a risk to install .debs from random web sites. I have had systems trashed by doing that, even if it's not any malicious activity by the author.

Some years ago I managed to compile Qt5 from sources on an old Pi. Worked fine, including display in the frame buffer with hardware accelerated 3D. No X Windows required. I can't find exactly the instruction I used but I guess enough has changed since then to make them obsolete.

But what I dd looks similar to what I see here:

Native Build of Qt5 on a Raspberry Pi https://wiki.qt.io/Native_Build_of_Qt_5 ... spberry_Pi

and here:

Native Build of Qt5 on a Raspberry Pi: https://wiki.qt.io/Native_Build_of_Qt5_ ... spberry_Pi

@swampdog

Do you have a link to the method you used to build Qt 5 on the Pi ?

swampdog
Posts: 221
Joined: Fri Dec 04, 2015 11:22 am

Re: Install Qt5 On Raspberry Pi2

Sat May 04, 2019 12:05 pm

@Heater

Unfortunately no. It's proprietary. A previous employer sold my code. It ended up in the hands of a US antivirus company of which I cannot speak due to an NDA.

I haven't got round to rewriting it.

Return to “General discussion”