Custom Widgets
Designing your own custom widgets in PyQt

As we've seen, Qt comes with a wide range of widgets built-in, which you can use to build your applications. Even so, sometimes these simple widgets are not enough -- maybe you need an input for some custom types, or want to visualize data in a unique way. In Qt you are free to create your own widgets, either from scratch or by combining existing widgets.

Widgets in Qt are built on bitmap graphics — drawing pixels on a rectangular canvas to construct the "widget". To be able to create your own custom widgets you first need to understand how the QPainter system works and what you can do with it. In this PyQt5 tutorial we'll go from basic bitmap graphics to our own entirely custom widget.

Start with “QPainter and Bitmap Graphics”

Custom Widgets

QPainter and Bitmap Graphics

Introduction to the core features of QPainter

Creating custom GUI widgets in PyQt5

Build a completely functional custom widget from scratch using QPainter

Animating custom widgets with QPropertyAnimation

Add dynamic visual effects to your custom widgets

Start now