Building Qt with wayland 0.85

darxus at darxus at
Sun Mar 18 18:11:12 PDT 2012

qtwayland is a plugin for qt that provides the wayland backend for qt.  It
depends on qtbase.  qtwayland has a 0.85 branch compatible with wayland
0.85.  But it doesn't currently build against qtbase master, which
is unfortunate.

Also, there's apparently lots of stuff in the qtwayland plugin other than
what's necessary just for qt apps to work with a wayland compositor, which
makes building the whole thing harder.

qtbase checkout 96232be1466e8c059c270b611ce7c32997ff60a9 allows you to
build the part of qtwayland which allows you to run qt apps with a wayland
compositor, which is qtwayland/src/plugins/platforms/wayland

So building qt for wayland 0.85 might look something like:

Build wayland 0.85:

Download this script:
source it ("source") to load the crazy pile of environment

# Ubuntu Oneric packages that make resolving the dependencies a little
# easier.
sudo apt-get install libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-sync0-dev 

cd ~/source
git clone git://
git checkout 96232be1466e8c059c270b611ce7c32997ff60a9
./configure -confirm-license -opensource -no-phonon-backend -debug -qpa -xcb -wayland -egl -opengl es2 -nomake examples -prefix ${QTDIR} -v -I $WLD/include -L $WLD/lib
sudo make install # Is this sudo necessary?
cd ..
git clone git:// -b 0.85
cd qtwayland/src/plugins/platforms/wayland
qmake -r
make install
cd ~/source/qtbase/examples/scroller/graphicsview
qmake -r
make install
~/install/bin/weston &
/graphicsview -platform wayland

96232be1466e8c059c270b611ce7c32997ff60a9 is just one commit that I tried
that worked, based on when 0.85 was branched.  I suspect there is a newer
commit that works.

Next up, qtwebkit!

"If everything seems under control, you're not going fast enough"
- Mario Andretti

More information about the wayland-devel mailing list