There is a guide for building qt_wallet of BitSharesX in ubuntu 14.04 here.
However, it's in chinese. So I roughly translate it as the following:
1. Install necessary packages:
$sudo apt-get update
$sudo apt-get install cmake git libreadline-dev uuid-dev g++ libdb++-dev libdb-dev zip libssl-dev openssl build-essential python-dev autotools-dev libicu-dev libbz2-dev libboost-dev libboost-all-dev
in Ubuntu 14.04, you also have to install qt5.3.0 and node.js from their official sites.
2. Fetch the source code
$ git clone https://github.com/BitShares/bitshares_toolkit.git
$ cd bitshares_toolkit
$ git submodule init
$ git submodule update
$ git checkout 0.2.1
$cmake -DINCLUDE_QT_WALLET=ON CMakeLists.txt
3. Prepare the web wallet
$ sudo npm install -g lineman
$ cd programs/web_wallet && npm install
$ cd ../../ && make buildweb
4. Build and run your qt_wallet
$ make
and you will get your qt_wallet at bitsharesx/programs/qt_wallet:
$ bitsharesx/programs/qt_wallet/BitSharesX
The make buildweb is definitely better than my way of doing it. that copies the htdocs into the correct folder automatically for you. I didn't build qt or nodejs from source though. I got them out of the standard trusty repo. I am installing a fresh os in a virtual machine to verify exactly which dependencies are needed.
**edit** I had missed a dependency nodejs-legacy in my original post. adding the following dependencies will prevent you from having to build nodejs from source. I am currently building the web wallet, will update if I missed any qt dependencies.
sudo apt-get install qt5-default libqt5webkit5-dev npm nodejs-legacy
**double edit** I can now confirm that only those four extra dependencies are needed to build the qt_wallet on a fresh 14.04 ubuntu.