Looking at QColor's qGray documentation http://doc.qt.io/qt-4.8/qcolor.html#qGray on how it converts RGB to Grayscale, it uses this formula:
(r * 11 + g * 16 + b * 5)/32

There are a few peculiarities here.
1. I can find no reference to this formula outside of this class in Qt. It is used nowhere, in any article on the subject that I can find.
2. The QColor documentation does not once talk about Gamma Correction, nor does it directly use the term Color Space.

All of that to ask, where is this grayscale conversion formula coming from and does it assume the RGB values are Linear or Non-Linear/Gamma Corrected?

Thank you