I subclassed a QPushButton so that I was able to re-implement the paintEvent(QPaintEvent *paint) method also advised by the official documentation.
QPushButton
paintEvent(QPaintEvent *paint)