View Single Post
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#5
To save CPU time, UIs are only updated when you ask for it, when the window is moved or when something else moves out of the way.

You'll have to find out how one sets a specific part of the screen as "dirty" and in need of an update. If you're using GTK+ you can do it like this
Code:
  GdkRectangle rectangle;
  rectangle.x = GTK_WIDGET(time_and_progress)->allocation.x;
  rectangle.y = GTK_WIDGET(time_and_progress)->allocation.y;
  rectangle.width = GTK_WIDGET(time_and_progress)->allocation.width;
  rectangle.height = GTK_WIDGET(time_and_progress)->allocation.height;

  gdk_window_invalidate_rect(win->window, &rectangle, TRUE);
I'm sure there are similar mechanics in Qt.