Solved Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.
-
The documentation to QSpinBox::valueChanged() exectly desribes your problem. Reading docs is sometimes useful...
-
@Christian-Ehrlicher yeah it works, but still... when I compile using Qt 6.0.1 64-bit it works fine, it should work.
The problem is not really the compile errors, it is why my code works fine using Qt 6.0.1 64-bit and fails when using Qt 5.15.1/2 32-bit.
In the OP I posted 3 errors but it is really 3 type of errors, there are a lot more than just 3 errors all over my project and also there are other type of errors.
I tried commenting the lines that threw the errors and it compiled successfully and thus a question arose: will I have to rewrite everything so it can compile in 32-bit?? That doesn't seem right to me, I don't think it is supposed to be this way.
-
Because the overloads triggering the compilation error have been either renamed or removed in Qt 6.
-
@SGaist Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit? It will feel like walking backwards though but if that's all to it I don't think I have much of a choice if I want to get my program in 32-bit exe.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit?
You have to compile Qt6 for 32bit and then compile your app using that Qt build.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
will I have to rewrite everything...
No, you don't.
You just need to modify your
connect()
statements, following the documentation that @Christian-Ehrlicher linked you: https://doc.qt.io/qt-5/qspinbox.html#valueChangedWhen your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
...so it can compile in 32-bit??
Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
Your current code will have the same errors with Qt 5 64-bit.
-
You just need to modify your connect() statements
Yeah I know, when I said "rewrite everything" I meant only the code that is triggering compiler errors. I think I misspoke.
When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
Your current code will have the same errors with Qt 5 64-bit.I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.
This means that we will not have 32bit Windows support available. Additionally, it will no longer be possible to create UWP applications on Windows 10.
If you want 32 bit Qt6, you will have to build Qt6 from sources
-
@J-Hilk said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Unlikely:
ooh too bad then. Does this mean they are discouraging the development of 32-bit programs on windows? Is there any good reason to provide only the 64-bit version of my program.
Edit: From what I gathered providing only the 32-bit is the best option(I might've gotten it wrong though) since it will run happily on both versions so it is not looking clear to me why Qt would discontinue it.If you want 32 bit Qt6, you will have to build Qt6 from sources
Could you elaborate on that?!
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Is there any good reason to provide only the 64-bit version of my program.
Well, the question is: how many computers are still in use with 32bit OS?
QtCompany does not provide 32bit Windows builds anymore simply because hardly anybody needs them (not many downloads in last years) and each additional build means additional work (like testing).
-
@jsulm As I plan to continue developing in Qt and following (and hopefully having soon enough knowledge to contribute) its evolution should I also push for 64-bit only programs on windows?
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
should I also push for 64-bit only programs on windows?
I can't answer this questions as I don't know who is going to use your apps and on which OS. If you have customers who still use 32bit Windows then you need to provide 32bit app. If you do not have such customers then forget about 32bit.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
it just feels like walking backwards that's all.
Well, the problem has existed since the start of Qt 5.0, when the new signal-slot syntax was introduced: https://doc.qt.io/qt-5/signalsandslots-syntaxes.html#selecting-overloaded-signals-and-slots
Qt 6 removed this annoyance. In this sense, Qt 6 is a step forward. That's why moving from Qt 6 to Qt 5 feels like a step backward ;-)
Does this mean they are discouraging the development of 32-bit programs on windows?
Microsoft is discouraging the distribution of 32-bit Windows (although they will continue to support it in the near future): https://www.engadget.com/windows-10-32-bit-oem-173055990.html
If you want 32 bit Qt6, you will have to build Qt6 from sources
Could you elaborate on that?!
You can use your 32-bit compiler to produce 32-bit Qt 6 DLLs: https://wiki.qt.io/Building_Qt_6_from_Git
-
@JKSH thank you for all the info, really useful.
-
@jsulm said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
If you do not have such customers
I am hoping I don't.
Thank you for your insight.