Hi All,
I am just wondering is this a Qt design intent to repaint the widget when mouse cursor enters/leaves the widget? Is there any way to just partially repaint the changed area for the widget in this case?
Thanks
Hi All,
I am just wondering is this a Qt design intent to repaint the widget when mouse cursor enters/leaves the widget? Is there any way to just partially repaint the changed area for the widget in this case?
Thanks
Are u sure QT paints the whole widget ???
Just check the QPaintEvent::rect() function...
In case of enter/leave events probably the whole widget is repainted. But this is a case only if the widget has Qt::WA_Hover attribute set (the style used can override the attribute for any widget it sees fit).
Thanks for your information Wysota, one more question though, can I just call setAttribute in the widget constructor to make sure this attribute is set to false? I tried that and it seems that Qt is still repainting the widget so just wondering if I missed anything..
BTW, I turned on QT_FLUSH_PAINT environment variable and that's how I see it's repainting the whole widget.
Thanks.
Bookmarks