## Set up Qt 4.8.x on Pi

I really love Qt, so one of the first things I wanted to do is to get my Qt application running on raspberry Pi.
The QtOnPi didn't work for me, because it is using Qt5, but my apps require good old Qt 4 desktop widgets. But what I understand it is possible to port it to Qt5

However, QtonPi has a massive advantage, you can set up a virtual enviorement on your linux PC, compile your Qt5 app on it, and it will automatically upload and run it on your Pi. As I said, I needed Qt 4, so I will just be leaving here notes for my self about Qt 4.

To install Qt it's pretty straight forward:

pacman -S qt

To compile your Qt app first make a makefile

qmake -o YourProFileHere.Pro

And then just run make, it will take a while and might crash several times, so you will have to do some small tweaking in your code.

For me two problems I encountered was in class header file I had defined every function with it's namespace in front of it, for x86 system it didn't bother, and in QCustomGraph library he is sending to qMax two diferent types of data varialables one is float and the other one double. Just wrap them bout in double() or float(). And you Sir have compiled your Qt app on arm architecture.

To run your app just write ./NameOfYourApp

### Related Articles

• #### Implementing pulse oximeter using MAX30100

Mar 8, 2017 | by Raivis Strogonovs
• #### nRF51 Makefile with Qt Creator

Jun 4, 2016 | by Raivis Strogonovs
• #### USART, FreeRTOS and C++ on nRF51

Dec 14, 2015 | by Raivis Strogonovs
• #### Starting with nRF51 BLE and Qt Creator

Dec 12, 2015 | by Raivis Strogonovs
• #### Touch gesture recognition using body capacitance

Nov 29, 2014 | by Raivis Strogonovs
• #### Introduction to data encryption

Oct 4, 2014 | by Raivis Strogonovs
• #### MEMS (Part 2) – Guide to using gyroscope L3G4200D

Jun 17, 2014 | by Raivis Strogonovs
• #### Johannes Adendorff in Simple TLS/SSL SMTP client for Qt5

DId you get BCC or CC that working?

#### Johannes Adendorff in Simple TLS/SSL SMTP client for Qt5

DId you get BCC or CC that working?

#### Sagie Meshulam in MEMS (Part 1) - Guide to using accelerometer ADXL345

Do you know if I can use flexiplot and Visual Code using C++? if so, how

#### Sagie Meshulam in MEMS (Part 1) - Guide to using accelerometer ADXL345

Do you know if I can use flexiplot and Visual Code using C++? if so, how

#### Drint in Pigaso - SVG to gcode coverter

Please say where did you refer to create your own gcode generator,I could not find any paper or journal

#### Drint in Pigaso - SVG to gcode coverter

Please say where did you refer to create your own gcode generator,I could not find any paper or journal

#### Drint in Pigaso - SVG to gcode coverter

Please say where did you refer to create your own gcode generator,I could not find any paper or journal