29.01.2014, 14:43, "Igor Mironchik" <igor.mironc...@gmail.com>: > Hi. > > I'm implementing AbstractScrollArea and ScrollArea for QtMWidgets library. > > Almost all have been done except painting scroll indicators. > > The problem is that that I can't draw on child widget. I installed event > filter for the child widget, and in the filter I invoke paint method for > scroll indicators. All is ok, but child's paint event become after event > filter's paint event. And child's paint event paints on my scroll > indicators. > > Is there any way to invoke child's pain event in filter method? I can't > simple invoke child's paint event because this method is protected... > > Any adeas?! >
You cannot neither paint on child widget, nor manipulate paintEvents' order. There are 2 possibile ways: 1. Implement these widgets as one custom widget (best performance, more code). For example, your scroll area can take rendering delegate with paint() method, called in proper moment from your paintEvent() to draw contents. 2. Add 3rd widget on top of scroll area (worse performance, but simpler) -- Regards, Konstantin _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest