Using Qt on the Raspberry Pi running Raspian

The Raspberry Pi Raspbian distribution is a pretty nice way to go. I am currently working on some stuff using Qt and the Raspberry Pi camera and decided that the easiest thing was to get things going natively. Raspbian comes with Qt4.8.2 so the easy way to get started was to do:

sudo apt-get install libqt4-dev qtcreator

Unfortunately, QtCreator does not find the toolchain for some reason. This has to be configured by hand. Go to Tools > Options and select Build & Run. Then, select the Tool Chains tab and click on the Add button. Select the GCC option. This will add some stuff to the dialog. The compiler path should be set to /usr/bin/g++ and the debugger to /usr/bin/gdb. This should complete setting up the tool chain.

Another problem I had was that it wanted to do a remote deployment. To change this, click on the Projects icon in the toolbar on the left of the QtCreator window and select the tab Run Settings. The deployment method should be set to No deployment. Do this by clicking on the Add button and selecting Deploy configuration. Click the Add button for the Run configuration and select Custom executable. On the Executable: line below, enter the relative path to the executable.

Then everything should pretty much work!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.