+号图标跟随主题优化
This commit is contained in:
parent
1aecc171af
commit
54555459fb
|
@ -117,10 +117,8 @@ BackupListWidget::BackupListWidget(QWidget *parent /*= nullptr*/, QHBoxLayout *p
|
|||
setGridSize(QSize(this->width(), 40));
|
||||
|
||||
// 列表为空时,展示一个“+”号图标和拖拽文件提示
|
||||
m_plusLogo = new QLabel;
|
||||
m_plusLogo->setFixedHeight(WIDTH_ITEM);
|
||||
QIcon icon = QIcon::fromTheme("list-add-symbolic", QIcon(":/symbos/list-add-symbolic"));
|
||||
m_plusLogo->setPixmap(icon.pixmap(icon.actualSize(QSize(16, 16))));
|
||||
m_plusLogo = new PixmapLabel;
|
||||
m_plusLogo->setThemeIconSchema("list-add-symbolic", ":/symbos/list-add-symbolic", QSize(16, 16));
|
||||
m_plusLogo->setEnabled(false);
|
||||
// 文件拖放区域
|
||||
m_plusText = new QLabel;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include "mylabel.h"
|
||||
#include "pixmaplabel.h"
|
||||
|
||||
class MyItemWidget : public QWidget
|
||||
{
|
||||
|
@ -76,7 +77,7 @@ private:
|
|||
bool checkPathLimit(const QString &path);
|
||||
|
||||
private:
|
||||
QLabel *m_plusLogo;
|
||||
PixmapLabel *m_plusLogo;
|
||||
QLabel *m_plusText;
|
||||
int m_type = QListWidgetItem::ItemType::UserType + 1;
|
||||
QStringList m_List;
|
||||
|
|
Loading…
Reference in New Issue