Skip to content

Commit

Permalink
fix: 控制中心标题栏返回按钮消失 (#588)
Browse files Browse the repository at this point in the history
DTK清除多余space使用的方法有问题,应使用itemAt而不是takeAt

Log: 控制中心标题栏返回按钮消失
Bug: https://pms.uniontech.com/bug-view-264379.html
Influence: 控制中心-标题栏
  • Loading branch information
Whale107 authored Jul 15, 2024
1 parent 09e1094 commit 3a01bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/dtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ void DTitlebarPrivate::setIconVisible(bool visible)
return;

if (visible) {
if (auto spacerItem = dynamic_cast<QSpacerItem *>(leftLayout->takeAt(0)))
if (dynamic_cast<QSpacerItem *>(leftLayout->itemAt(0)))
delete leftLayout->takeAt(0);

leftLayout->insertSpacing(0, 10);
Expand Down

0 comments on commit 3a01bae

Please sign in to comment.