Skip to content

Qt Embedded Quickstart

azuriel edited this page Oct 28, 2010 · 8 revisions

#Qt/Embedded 4.7 Quickstart Guide

Fetch, configure, and compile essentials

Qt Embedded docs: http://doc.qt.nokia.com/4.7/qt-embedded-linux.html

Qt Embedded install guide: http://doc.trolltech.com/4.7/qt-embedded-install.html

  1. Get the source
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0.tar.gz
  1. Configure qt with the correct dependencies (in this case, mouse input and the virtual framebuffer):
./configure -embedded generic -qt-mouse-linuxinput -qvfb
  1. Make in parallel (choose N to be number of cores*1.5, or cores*2,):
make -j N
sudo make install
  1. Fixup your PATH and LD_LIBRARY_PATH if needed:
export PATH=/usr/local/Trolltech/QtEmbedded-4.7.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0/lib:$LD_LIBRARY_PATH

This is enough to use the actual framebuffer in the console.

Running your first Qt/Embedded app

Reference: http://doc.qt.nokia.com/4.7/qt-embedded-running.html

We'll start off by running a demo application:

sudo -s
cd /usr/local/Trolltech/QtEmbedded-4.7.0/demos/textedit
./textedit -qws -mouse -keyboard

Hopefully your mouse and keyboard work. Ctrl-C to quit if they don't; else, you can exit using the normal menu.

Qt virtual framebuffer

The virutal framebuffer is one of the tools within Qt/X11. It can be nice for debugging.

Reference: http://doc.trolltech.com/4.7/install-x11.html

  1. Dependencies:
libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev
libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev
libxrender-dev
  1. Configure, make, install:
 ./configure
 make -j N
 sudo make install
  1. Fixup your paths:
 export PATH=/usr/local/Trolltech/Qt-4.7.0/bin:$PATH
 export LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.7.0/lib:$LD_LIBRARY_PATH

Then, compile virtual framebuffer tool. See http://doc.trolltech.com/4.7/qvfb.html