I find that I quite often store a shade of gray into a qRgb. I know at compile-time that the color is going to be gray. I propose a set of convenience functions for converting gray to color.
Here is my proposed implementation for qRgb. Of course, the same should be done for qRgba64.
I wrote a test on compiler explorer and noticed that these functions are not only more convenient but actually faster than the naive implementations. It seems that modern compilers aren't able to take advantage of a sign extension yet. The speed increase might make a significant difference when doing something like converting a color image to grayscale.