While the use of integers to initialise a QRgb looks odd it is correct language-wise. QRgb is a typedef equivalent to unsigned int.
It is not working as expected because setting the value this way has set the alpha channel to 0: the colour exists but is 100% transparent and will not match an opaque black/blue pixel. Try setting the colours using the qRgb() macro or, as KillGabio suggests, using symbolic names.




Reply With Quote
Bookmarks