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

Upgrade to Qt6 #482

Open
TheLastProject opened this issue Oct 23, 2022 · 8 comments
Open

Upgrade to Qt6 #482

TheLastProject opened this issue Oct 23, 2022 · 8 comments

Comments

@TheLastProject
Copy link
Member

Qt6 is out. Upgrade might be simple, might be near impossible.

Should start by changing PyQt5 to PyQt6 in dependencies and seeing what breaks (hopefully nothing, possibly a lot)

@airvzxf
Copy link
Contributor

airvzxf commented Oct 26, 2022

I can work on this, could you please assign to me?

@TheLastProject
Copy link
Member Author

Sure, let's hope it's easy instead of hard :)

@airvzxf
Copy link
Contributor

airvzxf commented Oct 27, 2022

It needs many changes in the code because QT6 changes a lot regarding QT5.

Added screenshots about these two errors:

  • The first one I solved, removing the version of import QtQuick.Controls or adding the last version import QtQuick.Controls 6.4
    • 01-QtQuick Controls_1 4-Error
  • The second, I can't resolve yet, but looks like it requires changes in the code. I didn't find the Extras and Styles in QT6. You have more experience in this topic, what do you think?
    • 02-QtQuick-Errors
  • If I removed all the versions, the problem still there because in QT they are not existing.
    • 03-QtQuick-Errors

References:

@TheLastProject
Copy link
Member Author

Looking at dd11097, QtQuick.Extras was included for the flat theme.

And QtQuick.Controls.Styles was added in a commit that doesn't describe it: 3fe352c

I think removing both imports may have stuff just work fine. At worst, it may misbehave during the app.setStyle calls in pext/__main__.py, those might need to be removed. As far as I know those were barely ever used ever, only called if someone started Pext specifically with the --style argument. Removing support for that if it's difficult to keep sounds completely fine to me too.

@airvzxf
Copy link
Contributor

airvzxf commented Oct 28, 2022

Well, I tried, and it needs to refactor and replacement because QT6 has huge changed related to QT5. Same reference Differences with Qt Quick Controls 1.

I made some changes, and it is running, but the menus are not working. Other stuff should not work. Since, I am not expert on QT, and I don't pretend to learn all QT in deep, I need your help with your experience and expertise.

I was tentative to add a summary with the changes, but it's better to see in a comparative using the GitHub tools.
https://github.com/Pext/Pext/compare/master...airvzxf:Pext:upgrade-to-qt6?expand=1

You can clone my repo (airvzxf/Pext) and checkout the branch upgrade-to-qt6. Please don't hesitate to modify and push changes.

Visible error when run in my local, any menu option is working:

04-QtQuick-Frankinstein

@TheLastProject
Copy link
Member Author

Hmm, interesting,

All I can tell is that the "Component is not ready" means that there was some QML error (it's awful to debug, I have no clue how to fix it when it occurs, I always just tried random stuff until it works). The property errors make me wonder if the MenuItem and TabBar QML6 types maybe have these functions under other names?

@TheLastProject
Copy link
Member Author

By the way, I don't know how you're doing on Hacktoberfest contributions, but if you're looking for more to do quickly then #457 is probably a good place to start because you almost already did that (and this Qt6 thing will probably take longer)

@airvzxf
Copy link
Contributor

airvzxf commented Oct 28, 2022

Totally, agree. I'll pause this work and contribute to the other.

@airvzxf airvzxf removed their assignment Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants