Browse Source

update

master
zhaohe 1 year ago
parent
commit
d00951cd33
  1. 9
      libzqt/zui/z_reg_table_list_box.cpp
  2. 6
      src/mainwindow.ui

9
libzqt/zui/z_reg_table_list_box.cpp

@ -31,7 +31,7 @@ ZRegItem::ZRegItem(QWidget *parent, QString &title, int addr, uint32_t flag) : Q
m_layout->setMargin(0);
// m_layout->setSpacing(0);
m_horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
m_horizontalSpacer = new QSpacerItem(30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
m_lable = new QLabel(title, this);
m_val = new QLineEdit(this);
m_InfoVal = new QLineEdit(this);
@ -75,6 +75,9 @@ ZRegTableList::ZRegTableList(QWidget *parent, const QString &title) //
// RegBox
{
m_regBox = new QGroupBox("寄存器列表", this);
auto sp = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sp.setVerticalStretch(1);
m_regBox->setSizePolicy(sp);
{
QScrollArea *testar = new QScrollArea(); // 创建滚动显示区域
{
@ -83,8 +86,8 @@ ZRegTableList::ZRegTableList(QWidget *parent, const QString &title) //
testar->setAlignment(Qt::AlignRight); // 设置滚动条位置
testar->setWidget(m_arWidget); // 将设置好的幕布嵌入到滚动显示区域
testar->setWidgetResizable(true); // 设置幕布自适应大小
testar->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
testar->setMinimumSize(800, 800);
testar->setSizePolicy(sp);
testar->setMinimumSize(700, 500);
}
m_regBoxLayoutL1 = new QVBoxLayout(m_regBox);

6
src/mainwindow.ui

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1448</width>
<height>1040</height>
<width>1458</width>
<height>556</height>
</rect>
</property>
<property name="sizePolicy">
@ -1164,7 +1164,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>1448</width>
<width>1458</width>
<height>20</height>
</rect>
</property>

Loading…
Cancel
Save