There is no << operator for basic_ostream (std::cout) and QString.
But there is a class that can encapsulate std::cout for the use with Qt:
QTextStream cout(stdout);
cout << "B" << b << "\n";
Another way would be to explicitly cast it to char*:
std::cout << "B" << b.toLocal8Bit().data() << "\n";