Many of the previous blog entries on this site demonstrated how to use the IO interfaces on the Raspberry Pi using command line applications. In this entry, the use of Qt4-based graphical user interface (GUI) application to control the Raspberry Pi's GPIO will be examined. While a cross compilation approach is possible, only native compilation will be considered in this entry for the sake of simplicity.
Install the Qt4 libraries/Tools
The first step would be to install the Qt4 libraries & tools. This can be done by running the following command on the Raspberry Pi:
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-dev-bin qt4-qmake
Write the Qt4 GUI application
The next step is to write a simple QWidget based application that controls the GPIO! While some of the source code will be shown below, please download it from here ...more ...