Further desperate investigation revealed following:
When i print &color (i.e. address of the private member color) inside different functions, I get two different results:
Both ColorPreviewWidget::ColorPreviewWidget and ColorPreviewWidget:aintEvent give
&color = 0x90753e4d60
while ColorPreviewWidget::setColor gives
&color = 0x907301b4a0
Added after 20 minutes:
You guess right. I've been working with two different instances of the custom widget, painting one and changing color to another. Thanks for your answer. Problem solved.
Bookmarks