10#include <qapplication.h>
12#include <qpainterpath.h>
17 : QAbstractButton(parent)
20 setFixedSize(size, size);
22 setCursor(Qt::PointingHandCursor);
33 QRect
rect = geometry();
36 QColor bgColor = qApp->palette().window().color();
38 bgColor.setRed(255 - bgColor.red());
39 bgColor.setGreen(255 - bgColor.green());
40 bgColor.setBlue(255 - bgColor.blue());
43 path.addRoundedRect(
rect, 3, 3);
48 painter.drawPath(path) ;
51 QPixmap map = this->icon().pixmap(
iconSize());
int iconSize(qreal width, qreal height)
QIcon loadIcon(const QString &name)