#include <QPainter> QPainter* paint = new QPainter(this); paint->background().color() paint->~QPainter();