feat(filelineedit): add browse button - #314
Open
ZnPdCo wants to merge 2 commits into
Open
Conversation
Member
|
这个有啥意义啊,我看不懂 |
Member
不用手写路径了吧,直接用文件选择器选 |
| FileLineEdit::FileLineEdit(QWidget *parent) : QLineEdit(parent) { completer = nullptr; } | ||
| FileLineEdit::FileLineEdit(QWidget *parent) : QLineEdit(parent) { | ||
| completer = nullptr; | ||
| QAction *browseAction = addAction(QIcon(":/icon/document-open.svg"), QLineEdit::TrailingPosition); |
Member
There was a problem hiding this comment.
Use QIcon::ThemeIcon::DocumentOpen instead.
Member
|
哦哦,懂了 |
Member
|
我建议还是改ui,可以抄一下其他地方的选文件怎么写的,designer 里面拖动一下应该挺快的。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在 filelineedit 输入框控件右侧添加一个浏览按钮,可以选择文件。
Windows 下 和 linux 下的斜杠也能正确切换:
如果是在右边添加三个点的按钮,感觉要改 ui,有点懒?所以就这么处理了。