NOTE: This method has not yet been thoroughly tested.

This is necessary if we want to install something that depends on qt, but simply
emerging it is impossible due to slot conflicts.

It is faster than the official instructions at
https://wiki.gentoo.org/wiki/Qt/FAQ
which involve updating the entire system (@world).

Make a list of the currently installed qt packages:
$ eix -I# dev-qt/ > qt-packages

Remove them all, ignoring the fact that other packages depend on them:
$ cat qt-packages | sudo xargs emerge -C

(It would be possible to just pipe the output of eix straight into xargs, but it
seems a good idea to keep a list of the packages being removed just in case.)

Reinstall the packages that depended on the removed packages, which will pull
the removed packages back in as dependencies (assuming they are, in fact, still
needed), in theory installing the new versions:
$ emerge -a @preserved-rebuild

If you get the following error from emerge -ac:
* Dependencies could not be completely resolved due to
* the following required packages not being installed:
then it is necessary to re-install (use emerge -1) the packages listed after
"pulled in by:". This should not bring in any new packages.