How to add a hover transition to QPushButton?
问题 I try to make a custom QPushButton with a stylesheet. I want to custom color of button when we mouse over it. It works, but I want to put a transition duration. But in Qt this option is not available. Here is my custom button: #include "bouton.h" Bouton::Bouton(QString title, QWidget *parent) : QPushButton() { setGeometry(50,50,120,40); setText(title); setMinimumHeight(30); setParent(parent); setStyleSheet(" QPushButton {" "border-radius: 5px; " "border: 1.5px solid rgb(91,231,255); "