As I said, installing an event filter and manually triggering update() should be enough. I think the problem is that the paint event is not called at all, not that it is called with wrong parameters.
At least that's what I understood from what you have written. It is called when i move child window and it is called when i press/move mouse in the mdi area. So why don't you ignore the rectangle and redraw everything you need? Even if it is, you can probably turn clipping off by passing some widget hint while constructing the widget.
QPaint Event-I guess the best solution is to apply an event filter on all sub windows, so that you are notified when they get moved.
I'm creating a level editor for my game using Qt for gui and i'm in really early stages.
Right now i'm trying to dynamically add objects ( entities ) on screen when i click a button.
You are saying "Simply redraw more than the rectangle".. Try this: void My Class::paint Event(QPaint Event *pe)That's not true.
The rectangle given by the paint event is only a hint, nothing more.
It seems to me that you dont understand what im talking about..
Please, be good, download simple test project ive attached.
Much nore logical would be reimplementation QMdi Area::paint Event() so it updates whole widget or turning clipping off somehow. And that was the question what window hint or what property turns clipping off. Yes you are right, but this is not the best solution i beleive because in this case painting will be doubled. paint Events are usually optimized, so there is a chance they'd get optimized here as well. I want to redraw all, but only small rect is redrawn.
Much nore logical would be reimplementation QMdi Area::paint Event() Hmm... i cant call update(QRect) in it because it leads to infinite loop. 0o, ill try that as soon as i get to work ) Edit: Tried, doesnt help =(Anyway.. Even reimplementation of move Event() in my child window.
Yes, i thought about this solution but its not so convinient because MDI need to be updated not only when sub Windows move but in some different cases. You get the event (which in turn has its type) as a parameter to the filter so there is no problem in reacting on wanted events only. Even if it is, you can probably turn clipping off by passing some widget hint while constructing the widget. In this case while sub windows move painting IS clipped to the rectangle equal to moving subwindow.
Otherwise you'd probably fall into an infinite loop. So why don't you ignore the rectangle and redraw everything you need? I think this is done by Qt to optimize painting, since generally there is no additional painting on mdi area besides child windows.
Try to move sub windows and u will see what i mean.