Use qDebug() instead of std::cout.