To append the result of one query to another, use a compound SELECT statement:
SELECT * FROM MyTable
UNION ALL
SELECT * FROM MyOtherTable
This requires that the subselects have the same number of columns.
If the other table is in another database, you must ATTACH it to the first one:
db.exec("ATTACH '/somewhere/else/test2.db' AS test2");
...
query->prepare("SELECT * FROM MyTable UNION ALL SELECT * FROM test2.MyTable");