mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 05:12:04 +08:00
DownloadItem 原始定义高度为 54px,上下边距各 4px;然而图片 label 高度定义为 48,且宽度未定义,明显放不下;DownloadListWidget 中添加 item 时,设置每个 item sizeHint 高度只有 50px,与 item 高度不一致 Log: 固定 DownloadItem 高度为 56px;修改 DownloadListWidget 添加 item 时每个 item 的 sizeHint 高度;使用 DLabel 替换 QLabel 用于单个 item 中应用名称显示,使用 setElideMode 保证名称过长时右边显示省略号,并添加鼠标悬浮提示
132 lines
3.5 KiB
XML
132 lines
3.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>DownloadListWidget</class>
|
|
<widget class="QWidget" name="DownloadListWidget">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>547</width>
|
|
<height>416</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>Form</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<widget class="QWidget" name="widget" native="true">
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<spacer name="verticalSpacer_2">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>40</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
<item>
|
|
<widget class="QLabel" name="label">
|
|
<property name="font">
|
|
<font>
|
|
<pointsize>11</pointsize>
|
|
</font>
|
|
</property>
|
|
<property name="text">
|
|
<string>The list is currently empty. Go and download some softwares!</string>
|
|
</property>
|
|
<property name="alignment">
|
|
<set>Qt::AlignCenter</set>
|
|
</property>
|
|
<property name="wordWrap">
|
|
<bool>false</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>56</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="SmoothListWidget" name="listWidget">
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="styleSheet">
|
|
<string notr="true">QListView,QScrollArea,QWidget#viewport,QWidget#scrollAreaWidgetContents
|
|
{
|
|
background-color:transparent;
|
|
margin:0px;
|
|
}
|
|
/**列表项选中*/
|
|
QListWidget::item::selected
|
|
{
|
|
background-color:transparent;
|
|
}</string>
|
|
</property>
|
|
<property name="frameShape">
|
|
<enum>QFrame::NoFrame</enum>
|
|
</property>
|
|
<property name="verticalScrollBarPolicy">
|
|
<enum>Qt::ScrollBarAsNeeded</enum>
|
|
</property>
|
|
<property name="horizontalScrollBarPolicy">
|
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
|
</property>
|
|
<property name="autoScroll">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="autoScrollMargin">
|
|
<number>10</number>
|
|
</property>
|
|
<property name="editTriggers">
|
|
<set>QAbstractItemView::NoEditTriggers</set>
|
|
</property>
|
|
<property name="resizeMode">
|
|
<enum>QListView::Fixed</enum>
|
|
</property>
|
|
<property name="spacing">
|
|
<number>4</number>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="pushButton">
|
|
<property name="text">
|
|
<string>Open download directory</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<customwidgets>
|
|
<customwidget>
|
|
<class>SmoothListWidget</class>
|
|
<extends>QListWidget</extends>
|
|
<header>widgets/common/smoothlistwidget.h</header>
|
|
</customwidget>
|
|
</customwidgets>
|
|
<resources/>
|
|
<connections/>
|
|
</ui>
|