July 2010
Intermediate to advanced
560 pages
14h 45m
English
By reimplementing a custom QWidget subclass’s paintEvent() and using a QPainter, we can draw anything we want. This is ideal for custom widgets, but is not at all convenient if we want to draw lots of individual items, especially if we want to provide the user with the ability to interact with the items. For example, in the past some users have created graphical applications using literally thousands of custom widgets to stand as graphical items, and although widget painting is very fast, handling a single mouse click in such situations could easily consume almost the whole CPU’s processing capability. Fortunately, ...
Read now
Unlock full access