Skip to content

Conversation

caomengxuan666
Copy link

  • Replace deprecated QLayout::setMargin() with setContentsMargins().
  • Replace QPalette::Foreground with QPalette::WindowText to adapt to Qt6's QPalette role changes.
  • Ensure compatibility with both Qt5 and Qt6 to avoid API-related compilation errors.

Test Results:

  • Successfully compiles and runs on both Qt5 and Qt6 environments.
  • The fixes maintain functional consistency and do not introduce new issues.

This update improves cross-version compatibility and provides better support for future migration to Qt6.

- Replace deprecated QLayout::setMargin() with setContentsMargins().
- Replace QPalette::Foreground with QPalette::WindowText to adapt to Qt6's QPalette role changes.
- Ensure compatibility with both Qt5 and Qt6 to avoid API-related compilation errors.

Test Results:
- Successfully compiles and runs on both Qt5 and Qt6 environments.
- The fixes maintain functional consistency and do not introduce new issues.

This update improves cross-version compatibility and provides better support for future migration to Qt6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant