1
0

close button icon

This commit is contained in:
Gary Wang
2019-10-06 14:12:52 +08:00
parent 0ae1def918
commit 665385aa3d
7 changed files with 142 additions and 12 deletions

25
toolbutton.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef TOOLBUTTON_H
#define TOOLBUTTON_H
#include <QPushButton>
QT_BEGIN_NAMESPACE
class QGraphicsOpacityEffect;
class QPropertyAnimation;
QT_END_NAMESPACE
class ToolButton : public QPushButton
{
Q_OBJECT
public:
ToolButton(QWidget * parent = nullptr);
public slots:
void setIconOpacity(qreal opacity);
private:
QGraphicsOpacityEffect * m_opacityFx;
QPropertyAnimation * m_opacityAnimation;
};
#endif // TOOLBUTTON_H