-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix: placeholder text horizontalAlignment not work #402
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
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.
没有看到哪里有使用 horizontalAlignment
呀
Doc Check bot |
主要是 placeholdertext updateAlignment时 parentitem转换失败。不需要单独设置这个 textfield 里面设置就可以。 TextField {
placeholderText: qsTr("test here")
horizontalAlignment: Text.AlignHCenter
} void QQuickPlaceholderText::updateAlignment()
{
if (QQuickTextInput *input = qobject_cast<QQuickTextInput *>(parentItem())) { // QQuickLoader
if (QQuickTextInputPrivate::get(input)->hAlignImplicit)
resetHAlign();
else
setHAlign(static_cast<HAlignment>(input->hAlign()));
} else if (QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(parentItem())) { // QQuickLoader
if (QQuickTextEditPrivate::get(edit)->hAlignImplicit)
resetHAlign();
else
setHAlign(static_cast<HAlignment>(edit->hAlign()));
} else {
resetHAlign();
}
} |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
deepin pr auto review关键摘要:
是否建议立即修改:
建议的修改:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kegechen, zccrs 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 |
remove loader
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#402
remove loader