1
0

feat: add prev and next button

This commit is contained in:
Gary Wang
2020-07-04 13:49:12 +08:00
parent 3b1af64397
commit fb24e54579
9 changed files with 221 additions and 13 deletions

View File

@@ -6,18 +6,20 @@
#include <QGraphicsOpacityEffect>
#include <QPropertyAnimation>
ToolButton::ToolButton(QWidget *parent)
ToolButton::ToolButton(bool hoverColor, QWidget *parent)
: QPushButton(parent)
, m_opacityHelper(new OpacityHelper(this))
{
setFlat(true);
setFixedSize(50, 50);
setStyleSheet("QPushButton {"
QString qss = "QPushButton {"
"background: transparent;"
"}"
"QPushButton:hover {"
"background: red;"
"}");
"}";
if (hoverColor) {
qss += "QPushButton:hover {"
"background: red;"
"}";
}
setStyleSheet(qss);
}
void ToolButton::setOpacity(qreal opacity, bool animated)