class ColorChangeEvent : public QCustomEvent { public: ColorChangeEvent( QColor color ) : QCustomEvent( ), c( color ) {} QColor color() const { return c; } private: QColor c; }; // To send an event of this custom event type: ColorChangeEvent* ce = ne