Skip to content
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

Qt6: port to Qt6 - C++ part #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Qt6: port to Qt6 - C++ part #20

wants to merge 1 commit into from

Conversation

moodyhunter
Copy link

This PR tries to port QHot to Qt6, with:

Limitations:

  • QtQuick.Dialog :: FileDialog has been moved to Qt.labs.platform (Available since Qt 5.8)
    • fileUrl property is now named file
    • (move it now?)
  • QtGraphicalEffects is removed, may need Qt5Compat to import it back
    • (is this import really in use?)

Changes:

Added a CMake option QHOT_USE_QT6 which defaults to OFF
Used ${QT_VERSION_MAJOR} in CMake target_link_libraries and get_target_property which will be set to 5 or 6 accordingly.
Removed command line option scaling and no-scaling since HiDPI scales are always enabled in Qt6.

  • Codes related to the limitations above are not changed (may be we cannot support both 5 and 6 ATST)

import QtQuick.Layouts 1.3

// Qt6! Use 'Qt.labs.platform' instead of 'QtQuick.Dialogs'
//import Qt.labs.platform 1.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, just a simple question, this Qt6! is a especial tag for the compiler/interpreter or just a comment ?
Other than that the patch looks fine, but I'll probably have the master branch for Qt6 and create a separated branch for Qt5.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I've seen this type of comment in some other projects, and just followed their rule.
It doesn't have a special meaning but makes the future search easier (like the keywords "// TODO" or "// WARNING")

@patrickelectric
Copy link
Owner

Hi @moodyhunter, any update on this ? I'm planning to do it this year otherwise

@moodyhunter
Copy link
Author

I haven't been working on these Qt things recently, so there won't be future updates.

Do feel free to merge this PR if you think it's fine, otherwise closing it would be fine :)

@patrickelectric
Copy link
Owner

Thanks @moodyhunter, I'm doing the update to Qt6, the code works, has some warnings, but I'm closing up now the build system. Thanks for the PR, I'll check pick some commits if necessary.

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.

2 participants