ikalnytskyi/termcolor

Qt support

Shatur opened this issue · 3 comments

Hi! Is it possible to use the library with Qt's qInfo(), qDebug() and qCritical()? They have similar to iostream syntax.

Ah, I figured out that the library is built directly using std::ostream :(

It should be possible to support Qt streams too. I'm not sure to what extend though, since I don't know whether Qt streams allow to store format flags or not (something we need for colorize and nocolorize manipulators).

Since Qt is quite a widespread framework, I think it makes sense to support it. I'll reopen this ticket.

I think that the above macros cannot be supported, but QTextStream probably can be. It can write directly to stdout and stderr.