9.4. SummaryConstructing a responsive user interface is not all that difficult if you know the techniques. It is important to remember, when writing a GUI application, that your code needs to divide its time between performing work and interacting with the user. One should not be sacrificed for the other. In particular, it is important to stop thinking in a linear way when coding a long task—the rest of your application cannot wait for the long task. You should ask yourself the following questions:
Answering these questions will help you effectively use QTimer to perform long jobs. You can speed up window updates by using the double-buffer technique. This can keep you from having to unnecessarily re-create your window's contents. This technique can also help reduce flicker by updating the entire window at once rather than drawing multiple objects on the window. |