Open
Conversation
Contributor
C14147
commented
Oct 18, 2025
- 我这里使用了宏来处理Qt5和Qt6的接口兼容性
- 加入#include 是因为部分情况下编译器无法正确找到QElapsedTimer
Owner
|
qt 6的checkStateChanged 代替 stateChanged 有点坑啊。这两个信号的参数类型实际上不同的 |
Owner
|
我看文档里stateChanged只是deprecated,应该不会导致编译失败吧 |
Contributor
Author
@royqh1979 |
Contributor
Author
而且由于项目的connect函数使用了 新式连接语法(不使用SLOT和SINGLE宏包装信号和槽) ,更换是有必要的:Qt6会在将信号传输给槽时隐式转换为int |
Owner
最好还是把两个slots的参数类型也一起改了 而不是依赖隐式转换 |
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.