PDA

View Full Version : Refresh the Mainwindow at run time



sabeesh
15th November 2007, 09:37
Hi,
I have a main window in my program and when I click on a button, it create a child window. I need to refresh the main window when I move the child window. How can I do it?
Please help me.

jpn
15th November 2007, 10:43
What do you want to do? You could for example install the main window as an event filter (http://doc.trolltech.com/4.3/qobject.html#eventFilter) on the child window and catch QEvent::Move.

sabeesh
15th November 2007, 12:01
Hi,
I need that, I have a program and when I click on a button, it load another window and it contain a picture. The probs is that, when I move the child window, then the old position of the window hold the picture of that child window. i think its, memory probs. But when we refresh the mainwindow it cleare that unwanted picture. So I need to refresh the screen when i move the child window. Or please give another solutions for this.

Please help me

jpn
15th November 2007, 14:16
The probs is that, when I move the child window, then the old position of the window hold the picture of that child window. i think its, memory probs. But when we refresh the mainwindow it cleare that unwanted picture. So I need to refresh the screen when i move the child window.
The underlying window system will send paint events when a window underneath is exposed. You must be doing something weird. Do you have any custom widgets in your main window that show this garbage? Could we see the slot that is connected to the button?