Hey, trog! Ubuntu et. al. have obfuscated packaging conventions which make chasing down dependencies difficult, but I think you're looking for the package qtdeclarative5-dev or qt5declarative5-dev or something like that. I'm pretty sure several of the Ubuntu packages have two 5's in the name, alongside several others which are similar but have only one 5, and of course they don't bother to document what the difference is, or, more importantly, what all you need to install if you just want to use software and don't want to devote yourself to the finer points of package naming convention. I've spent several long, annoying sessions trying to figure out how to build on Ubuntu. x[
The easy answer is, you can remove the test targets from the qml-extras and qml-material .pro files, and then you won't need the QtTest stuff. Perhaps an easier answer yet is to simply install Qt 5.4 to /opt or something and point QTDIR at that.