Qt: Have parent Widget class draw something in addition to the child class widget -
more , more seems philosophical qt question:
i have widget representing window a. have widget representing window, deriving a, called b.
b draws stuff, want a contribute drawing, e.g. draw image on b draws. want b unaware of this, not having cooperate a other deriving it.
is possible?
override event() in a:
bool a::event ( qevent * e) { bool handled = qwidget::event(e); if(e->type() == qevent::paint) { // cast e qpaintevent , overlay painting } return handled; }
Comments
Post a Comment