You can pass a fourth parameter specifying the value of the alpha channel while constructing a QColor object. I'm not sure why you are using GraphicsView for this, unless the example above is just a big simplification of your true code.