On a project I'm working on, I need to update many QLabels very quickly. Each label needs to be updated at about 20 to 50 hertz and there can be over 50 labels at any given time. The problem I'm having is after running the program for about a minute, the labels freeze and the whole program crashes about 10 seconds later. If I comment out the setText() and setNum() calls and reroute the outputs to the console, it runs fine and never crashes. Why does calling SetText() and setNum() so quickly cause the program to crash and how can I prevent this?
When it freezes, if I move the window it continues like normal.
I can't seem to find the problem but here is the code that does the work with the labels.
This is my function that goes through all the labels:
One more guess: Try calling setFocus() on your display widget in doPeriodic() after you iterate the map.
If you post your code somewhere so I can download it, I'll be happy to take a look. Kind of hard to get an Idea of what's going on from the snippets that you have posted.