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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -