Some thoughts:
- QWidget::update() is a slot your widget already has, not something you need to reimplement.
- Calling update() inside the paintEvent() makes no sense.
- Connecting the timer to a generic QWidget (that you are not painting) will not cause your widget to paint.
Here is a complete example of a custom widget: Analogue Clock Example
Bookmarks