@Arty.McLabin The application seems to have a UI, so calling ui->setupUi(this); is perfectly valid. What is strange: in detail.cpp it is called in a for loop (setupUi() should be called only once).
std::cout is always available as it is the standard output, the user just needs to start the app from a command line (same for qDebug()). But you're right it is better to use qDebug() in Qt applications for debug output.