新增了SpkAppItem,更改style型对象名,修复侧边栏bug

This commit is contained in:
RigoLigoRLC
2021-08-18 16:44:05 +08:00
parent d49917c6fb
commit f6baf41306
16 changed files with 150 additions and 44 deletions

31
inc/spkappitem.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
class SpkAppItem : public QWidget
{
Q_OBJECT
public:
SpkAppItem(QWidget *parent = nullptr);
void SetIcon(QPixmap p) { mIcon->setPixmap(p); }
void SetTitle(QString s) { mTitle->setText(s); }
void SetDescription(QString s) { mDescription->setText(s); }
protected:
void paintEvent(QPaintEvent *e);
private:
QLabel *mIcon;
QLabel *mTitle;
QLabel *mDescription;
QVBoxLayout *mLayText;
QHBoxLayout *mMainLay;
static constexpr int IconSize = 72;
};