How do I transfer a project from Qt5 to Qt6?
-
I bought a new laptop and downloaded the latest version of qt creator but the problem is that qt creator is already Qt6 while my project is still Qt5, when I tried to run it an error occurred.
:-1: error: Unknown module(s) in QT: script
How to do it, do I have to make everything again?
-
I bought a new laptop and downloaded the latest version of qt creator but the problem is that qt creator is already Qt6 while my project is still Qt5, when I tried to run it an error occurred.
:-1: error: Unknown module(s) in QT: script
How to do it, do I have to make everything again?
@Blackzero said in How do I transfer a project from Qt5 to Qt6?:
How to do it, do I have to make everything again?
The script module was removed from Qt Framework with Qt6 and it was in Qt5 also only for compatibility reasons to Qt4...
For alternatives, see here.
It might require some rework of your app.Btw: You could have checked it before you decided to use the Qt Script module which was at its end of life already.
-
@Blackzero What @Pl45m4 wrote is correct, but do you need to port your app to Qt 6 now?
Even when Creator is built with Qt 6, that does not mean you cannot develop Qt 5 (or even 4) apps with it.
That may give you some time to do proper porting to one of the script alternatives.
Regards
-
@Blackzero said in How do I transfer a project from Qt5 to Qt6?:
How to do it, do I have to make everything again?
The script module was removed from Qt Framework with Qt6 and it was in Qt5 also only for compatibility reasons to Qt4...
For alternatives, see here.
It might require some rework of your app.Btw: You could have checked it before you decided to use the Qt Script module which was at its end of life already.
-
@Pl45m4 said in How do I transfer a project from Qt5 to Qt6?:
It might require some rework of your app.
It's not like I'm moving to Qt6 because I have a lot of code to fix, what's so special about Qt6?
@Blackzero said in How do I transfer a project from Qt5 to Qt6?:
what's so special about Qt6?
Being actively supported and having a future. Qt 5.15 is in extended support for commercial customers until May 2025.
That does not mean your existing code will suddenly stop working but you will need to keep your own copies of Qt libraries you use.
-
@Pl45m4 said in How do I transfer a project from Qt5 to Qt6?:
It might require some rework of your app.
It's not like I'm moving to Qt6 because I have a lot of code to fix, what's so special about Qt6?
@Blackzero said in How do I transfer a project from Qt5 to Qt6?:
what's so special about Qt6?
Nothing... just a new software release... new features were added, old/unused/outdated things got removed... "Progress".
For the same reason you are not using Windows 98 right now, and won't be able to run the latest software on ancient systems.because I have a lot of code to fix
Could have been easily avoided if you had a look at the documentation page of the Qt Script Module. The warning that the only reason why the module is still there at all - which is compatibility with Qt4 - has been there since an early Qt5.
It wasn't even recommeded to use in Qt5... You started with Qt5 and should have used the replacements right away.