Results 1 to 4 of 4

Thread: Refresh the Mainwindow at run time

  1. #1
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Refresh the Mainwindow at run time

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Refresh the Mainwindow at run time

    What do you want to do? You could for example install the main window as an event filter on the child window and catch QEvent::Move.
    J-P Nurmi

  3. #3
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Refresh the Mainwindow at run time

    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
    Last edited by sabeesh; 15th November 2007 at 11:06.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Refresh the Mainwindow at run time

    Quote Originally Posted by sabeesh View Post
    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?
    J-P Nurmi

Similar Threads

  1. Replies: 1
    Last Post: 11th September 2007, 13:34
  2. QDateTime GMT add sec. or - sec. from locale time....
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2007, 16:39
  3. mainwindow does not refresh
    By edb in forum Qt Programming
    Replies: 22
    Last Post: 25th January 2006, 16:42
  4. Problem with pointers while using localtime() and time()
    By jamadagni in forum General Programming
    Replies: 7
    Last Post: 11th January 2006, 15:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.