新二维码/条形码编辑逻辑
This commit is contained in:
@@ -14,6 +14,8 @@ FileManageWidget::FileManageWidget(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
applyStyleSheet();
|
||||
|
||||
// 安装事件过滤器用于判断当前焦点位于系统文件列表还是U盘文件列表,高亮获得焦点的列表
|
||||
ui->systemFileListView->installEventFilter(this);
|
||||
ui->udiskFileListView->installEventFilter(this);
|
||||
@@ -202,3 +204,46 @@ void FileManageWidget::copyFiles(QListWidget *from, QListWidget *to)
|
||||
qInfo() << "Command: " << cmd << ", result: " << ret;
|
||||
}
|
||||
}
|
||||
|
||||
void FileManageWidget::applyStyleSheet()
|
||||
{
|
||||
QString styleSheet = R"(
|
||||
|
||||
QPushButton#closeBtn {
|
||||
background-color: #E6F7FF;
|
||||
border: 1px solid #87CEEB;
|
||||
border-radius: 4px;
|
||||
font-size: 24px;
|
||||
color: #228B22;
|
||||
}
|
||||
QPushButton#closeBtn:hover{
|
||||
background-color: #D1E9FF;
|
||||
}
|
||||
|
||||
QPushButton#closeBtn:pressed{
|
||||
background-color: #BAE7FF;
|
||||
}
|
||||
|
||||
QPushButton {
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 18px;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #7C828E;
|
||||
color: #606060;
|
||||
border-color: #808080;
|
||||
}
|
||||
)";
|
||||
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ private:
|
||||
|
||||
// 用于文件显示列表中,存放每个文件名对应的绝对路径所用的数据键
|
||||
static constexpr int AbsPathRole = Qt::UserRole + 1;
|
||||
|
||||
void applyStyleSheet(); // 应用样式表
|
||||
};
|
||||
|
||||
#endif // FILEMANAGEWIDGET_H
|
||||
|
||||
@@ -6,9 +6,15 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>786</width>
|
||||
<height>498</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
|
||||
Reference in New Issue
Block a user