Skip to content

Commit 25bda81

Browse files
JWWTSLdeepin-bot[bot]
authored andcommitted
fix: The "Add Group" button cannot be focused using the Tab key.
log: Explicitly specified the tab order using setTabOrder(m_pushButton, m_addGroupButton) and set the focus policy of both buttons to Qt::TabFocus. pms: bug-337813
1 parent 9b92777 commit 25bda81

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/remotemanage/remotemanagementpanel.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,10 @@ void RemoteManagementPanel::initUI()
242242
m_listWidget->setObjectName("RemoteManageListWidget");
243243
m_addGroupButton = new DPushButton(this);
244244
m_addGroupButton->setObjectName("AddServerGroupButton");
245+
m_addGroupButton->setFocusPolicy(Qt::TabFocus);
245246
m_pushButton = new DPushButton(this);
246247
m_pushButton->setObjectName("RemoteAddPushButton");
248+
m_pushButton->setFocusPolicy(Qt::TabFocus);
247249

248250
m_searchEdit->setClearButtonEnabled(true);
249251

@@ -345,4 +347,9 @@ void RemoteManagementPanel::initUI()
345347
}
346348
}
347349
});
350+
351+
// 显式设置 Tab 焦点顺序,匹配视觉布局
352+
setTabOrder(m_searchEdit->lineEdit(), m_listWidget);
353+
setTabOrder(m_listWidget, m_pushButton);
354+
setTabOrder(m_pushButton, m_addGroupButton);
348355
}

0 commit comments

Comments
 (0)