QT application, generate pdf from database requests