-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: ajust window flags #380
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#380
Doc Check bot |
@@ -319,6 +340,12 @@ DQuickWindowAttached::DQuickWindowAttached(QWindow *window) | |||
: QObject(window) | |||
, DObject(*new DQuickWindowAttachedPrivate(window, this)) | |||
{ | |||
auto windowFlags = window->flags(); | |||
if (window->isTopLevel()) { | |||
fixTopLevelWindowFlags(windowFlags); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个行为,应该让window的创建者自己设置吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
widget 里面是 qwidgetwindow 主动做了这个事,默认窗口只有 Qt::Window
这个 flag
如果让创建者自己设置,那么所有的窗口都需要自行处理一次,包括我的example也没有最大化、最小化、关闭按钮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMinimizeButtonHint | Qt.WindowMaximizeButtonHint
应用 倒是也可以这么设置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个操作会不会覆盖了应用在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.
Needs 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.
Needs 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