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



ADVERTISEMENT

  • James J

    James J in Simple library for driving 20x4 LCD with 4bits

    Very good writeup. I thought had been fighting my code for a week or two and confirmed what I was dooing was right. This overview is the best I have seen for doing the code. You may wish to add one thing though that I have found on another website. Urge people to check the contrast dial on...

    Helpful friend

    Helpful friend in MEMS (Part 1) - Guide to using accelerometer ADXL345

    Start with reading about C language, proceed to reading about Arduino platform/ide proceed to reading about i2c bus proceed to reading about adxl345. Rather not the other way round, although that's probably also possible, but it will be more demanding, as you have already...

    Chris Sparks

    Chris Sparks in Simple TLS/SSL SMTP client for Qt5

    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed

    Edward Martin

    Edward Martin in Introduction to data encryption

    The introduction to the data encryption is very much helpful as you will get to know about the data encryption procedure which might help you to protect the files and folders. You can check the 

    bean

    bean in DIY 3D printer, AKA RepRap

    The 3D printer creates the dimensional object and with the features of the 3D printer, it executes the process if need further query then visit fix error code 0xc004f074...

    preter jack

    preter jack in Single Cycle MIPS CPU in VHDL

    Single-cycle CPU is more improved than the normal and usual CPUs and it has a lot of advantages and all you can get from fix

    henrydevid

    henrydevid in nRF51 Makefile with Qt Creator

    It is great for all, I have some different tricks if you want to know it then for that I have some different tricks, for that, you want to learn to code. For that, if you want to know it then for that you just visit some tutorial. And from there it is great for all. If you faced any type...