17 Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
20 explicit IconButton(QWidget *parent =
nullptr);
23 static IconButton *fromAction(QAction *action, std::uintptr_t
id = 0);
24 const QPixmap &pixmap()
const;
25 void setPixmap(
const QPixmap &pixmap);
26 QSize sizeHint()
const override;
28 static constexpr auto defaultPixmapSize = QSize(16, 16);
31 void paintEvent(QPaintEvent *event)
override;
32 void keyPressEvent(QKeyEvent *event)
override;
33 void keyReleaseEvent(QKeyEvent *event)
override;
36 void assignDataFromActionChangedSignal();
37 void assignDataFromAction(
const QAction *action);