chore: ajust window flags - #380
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#380
|
Doc Check bot |
| { | ||
| auto windowFlags = window->flags(); | ||
| if (window->isTopLevel()) { | ||
| fixTopLevelWindowFlags(windowFlags); |
There was a problem hiding this comment.
这个行为,应该让window的创建者自己设置吧?
There was a problem hiding this comment.
widget 里面是 qwidgetwindow 主动做了这个事,默认窗口只有 Qt::Window 这个 flag
如果让创建者自己设置,那么所有的窗口都需要自行处理一次,包括我的example也没有最大化、最小化、关闭按钮
There was a problem hiding this comment.
flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint
应用 倒是也可以这么设置
There was a problem hiding this comment.
这个操作会不会覆盖了应用在Window设置的flags,
|
TAG Bot New tag: 5.6.34 |
f8235a8 to
0f0192a
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#380
deepin pr auto review关键摘要:
是否建议立即修改: |
|
TAG Bot New tag: 5.0.35 |
|
这是解决啥bug? |
fix window flags is always Qt::Window
0f0192a to
6c4f65b
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kegechen The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kegechen The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#380
不算是bug,应用如果直接用dtk的 window, 就算有标题栏默认是没有最大最小关闭这些按钮的。需要手动设置 flags 才行。这里 参考widget 主动设置一下flags,当然也可以不加,要求用户自己设置。 改的就是一个默认行为而已 |
|
TAG Bot New tag: 5.7.1 |
|
TAG Bot New tag: 5.7.2 |
|
TAG Bot New tag: 5.7.3 |
|
TAG Bot New tag: 5.7.4 |
fix window flags is always Qt::Window