Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. migrate from Qt5.11 to 6
Forum Updated to NodeBB v4.3 + New Features

migrate from Qt5.11 to 6

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 5 Posters 1.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    It's an option you select in the online installer or maintenance tool.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lightshadown
      wrote on last edited by Lightshadown
      #9

      ok i did try to follow everyones advice, i used the maintainance tool and updated to Qt 6 and also Mingw that is provided with Qt, under the Tools folder got

      mingw 530_32
      mingw730_32
      mingw730_64
      mingw810_32
      mingw810_64

      im using the g++ from mingw810_64 and the qmake from Qt 6.1.2 but still got too many warnings. heres the paste.bin with all the warnings, link text

      Edit: im not so sure, but under the bin folder theres also several files that looks like this- x86_64-w64-mingw32-c++, x86_64-w64-mingw32-g++, etc

      JKSHJ 1 Reply Last reply
      0
      • L Lightshadown

        ok i did try to follow everyones advice, i used the maintainance tool and updated to Qt 6 and also Mingw that is provided with Qt, under the Tools folder got

        mingw 530_32
        mingw730_32
        mingw730_64
        mingw810_32
        mingw810_64

        im using the g++ from mingw810_64 and the qmake from Qt 6.1.2 but still got too many warnings. heres the paste.bin with all the warnings, link text

        Edit: im not so sure, but under the bin folder theres also several files that looks like this- x86_64-w64-mingw32-c++, x86_64-w64-mingw32-g++, etc

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #10

        @Lightshadown said in migrate from Qt5.11 to 6:

        heres the paste.bin with all the warnings, link text

        • Your log contains references to both Qt 6.12 and Qt 5.11.3. Something has gotten horribly mixed up somewhere. Delete all of your build files and start with a clean slate. Also, make sure that Qt and MinGW are not in your global system PATH.
        • You said you are using g++ from Qt's mingw810_64 -- are you sure? I see a reference to C:\MinGW\msys\1.0\bin\

        Also, it looks like you're building from the MSYS shell. Sometimes, using the Windows Command Prompt provides better results.

        @Lightshadown said in migrate from Qt5.11 to 6:

        I have a program i develop in Qt 5.11 using mingw32, it works fine but i want to migrate to 64bits programs so i need either Qt5,14 o Qt 6

        The recommended migration path is Qt 5.11 -> Qt 5.15 -> Qt 6.x

        You should port to Qt 5.15 first and fix all deprecation warnings before you try to port to Qt 6.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        1
        • L Offline
          L Offline
          Lightshadown
          wrote on last edited by Lightshadown
          #11

          ok, it seems my PATH was a complete mess, i erased everything related to qt and ming, i only left the location of make C:\MinGW\msys\1.0\bin and it seems to work kinda ok, now it get other warnings related to things like QApplication::desktop()->size() not a member of QApplication and layout()->setMargin(0), QLayout has no member call set margin or (this is strange), errors like sstream seems to miss a dll, but that seems to be related to changes on QT 6, now i need to figure it out how to fix them, sadly this is part of a repo i downloaded from Github so no way to ask the owner.

          Right now will try to find the equivalents to my code, thanks, heres the output https://pastebin.com/vPYy7hfU

          JKSHJ 1 Reply Last reply
          0
          • L Lightshadown

            ok, it seems my PATH was a complete mess, i erased everything related to qt and ming, i only left the location of make C:\MinGW\msys\1.0\bin and it seems to work kinda ok, now it get other warnings related to things like QApplication::desktop()->size() not a member of QApplication and layout()->setMargin(0), QLayout has no member call set margin or (this is strange), errors like sstream seems to miss a dll, but that seems to be related to changes on QT 6, now i need to figure it out how to fix them, sadly this is part of a repo i downloaded from Github so no way to ask the owner.

            Right now will try to find the equivalents to my code, thanks, heres the output https://pastebin.com/vPYy7hfU

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #12

            @Lightshadown said in migrate from Qt5.11 to 6:

            now it get other warnings related to things like QApplication::desktop()->size() not a member of QApplication and layout()->setMargin(0), QLayout has no member call set margin

            That's why I suggested that you migrate to Qt 5.15 first. When you build in Qt 5.15, you get deprecation warnings instead of compilation errors. Often, the warnings will also tell you how to replace the deprecated functions.

            Alternatively, you can check the Qt 5 documentation: https://doc.qt.io/qt-5/qlayout-obsolete.html#margin-prop

            All the functions/classes that are deprecated in Qt 5 no longer exist in Qt 6. After you have fixed the deprecation warnings for your app in Qt 5.15, it becomes a lot easier to port your app to Qt 6.

            ok, it seems my PATH was a complete mess, i erased everything related to qt

            I highly discourage adding Qt to the system PATH. It can cause DLL Hell and break other apps that depend on a different versions of Qt.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            L 1 Reply Last reply
            1
            • JKSHJ JKSH

              @Lightshadown said in migrate from Qt5.11 to 6:

              now it get other warnings related to things like QApplication::desktop()->size() not a member of QApplication and layout()->setMargin(0), QLayout has no member call set margin

              That's why I suggested that you migrate to Qt 5.15 first. When you build in Qt 5.15, you get deprecation warnings instead of compilation errors. Often, the warnings will also tell you how to replace the deprecated functions.

              Alternatively, you can check the Qt 5 documentation: https://doc.qt.io/qt-5/qlayout-obsolete.html#margin-prop

              All the functions/classes that are deprecated in Qt 5 no longer exist in Qt 6. After you have fixed the deprecation warnings for your app in Qt 5.15, it becomes a lot easier to port your app to Qt 6.

              ok, it seems my PATH was a complete mess, i erased everything related to qt

              I highly discourage adding Qt to the system PATH. It can cause DLL Hell and break other apps that depend on a different versions of Qt.

              L Offline
              L Offline
              Lightshadown
              wrote on last edited by Lightshadown
              #13

              @JKSH i did follow your advice and installed Qt 5.15 and using the mingw that is provided with Qt tools/mingw810_64 also i erased all related to Qt on the PATH but instead of deprecated warnings i get no defined or double definition errors from even the basic files, im pasting my log but its kinda odd, something like this

              In file included from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cctype:42,
                               from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/localefwd.h:42,
                               from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:43,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qbytearray.h:52,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qstring.h:50,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/qprinter.h:44,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/QPrinter:1,
                               from Impresora.h:16,
                               from Impresora.cpp:13:
              c:/Qt14/Tools/mingw810_64/x86_64-w64-mingw32/include/wctype.h:135:29: error: expected ',' or '...' before numeric constant
               int __cdecl iswblank(wint_t _C);
                                           ^~
              In file included from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:74,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qsharedpointer_impl.h:70,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qsharedpointer.h:48,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtGui/qpagelayout.h:44,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtGui/qpagedpaintdevice.h:45,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/qprinter.h:46,
                               from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/QPrinter:1,
                               from Impresora.h:16,
                               from Impresora.cpp:13:
              c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/concurrence.h:124:5: error: '__gthread_mutex_t' does not name a type; did you mean '__gthread_mutex_lock'?
                   __gthread_mutex_t _M_mutex;
                   ^~~~~~~~~~~~~~~~~
                   __gthread_mutex_lock
              

              heres my full log paste.bin https://pastebin.com/Ecms50w8

              Edit: i did try using mingw32-make.exe but it said its incompatible and should use MSYS

              JKSHJ 1 Reply Last reply
              0
              • L Lightshadown

                @JKSH i did follow your advice and installed Qt 5.15 and using the mingw that is provided with Qt tools/mingw810_64 also i erased all related to Qt on the PATH but instead of deprecated warnings i get no defined or double definition errors from even the basic files, im pasting my log but its kinda odd, something like this

                In file included from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cctype:42,
                                 from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/localefwd.h:42,
                                 from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:43,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qbytearray.h:52,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qstring.h:50,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/qprinter.h:44,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/QPrinter:1,
                                 from Impresora.h:16,
                                 from Impresora.cpp:13:
                c:/Qt14/Tools/mingw810_64/x86_64-w64-mingw32/include/wctype.h:135:29: error: expected ',' or '...' before numeric constant
                 int __cdecl iswblank(wint_t _C);
                                             ^~
                In file included from c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/memory:74,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qsharedpointer_impl.h:70,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtCore/qsharedpointer.h:48,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtGui/qpagelayout.h:44,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtGui/qpagedpaintdevice.h:45,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/qprinter.h:46,
                                 from C:/Qt14/5.15.0/mingw81_64/include/QtPrintSupport/QPrinter:1,
                                 from Impresora.h:16,
                                 from Impresora.cpp:13:
                c:/Qt14/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/concurrence.h:124:5: error: '__gthread_mutex_t' does not name a type; did you mean '__gthread_mutex_lock'?
                     __gthread_mutex_t _M_mutex;
                     ^~~~~~~~~~~~~~~~~
                     __gthread_mutex_lock
                

                heres my full log paste.bin https://pastebin.com/Ecms50w8

                Edit: i did try using mingw32-make.exe but it said its incompatible and should use MSYS

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #14

                @Lightshadown said in migrate from Qt5.11 to 6:

                i did try using mingw32-make.exe but it said its incompatible and should use MSYS

                1. Remove C:\MinGW\msys\1.0\bin from your PATH
                2. Delete your build folders
                3. Use the Windows Command Prompt (cmd.exe) rather than MSYS
                4. Use C:\Qt14\Tools\mingw810_64\bin\mingw32-make.exe rather than C:\MinGW\msys\1.0\bin\make.exe

                What happens now?

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                L 1 Reply Last reply
                0
                • JKSHJ JKSH

                  @Lightshadown said in migrate from Qt5.11 to 6:

                  i did try using mingw32-make.exe but it said its incompatible and should use MSYS

                  1. Remove C:\MinGW\msys\1.0\bin from your PATH
                  2. Delete your build folders
                  3. Use the Windows Command Prompt (cmd.exe) rather than MSYS
                  4. Use C:\Qt14\Tools\mingw810_64\bin\mingw32-make.exe rather than C:\MinGW\msys\1.0\bin\make.exe

                  What happens now?

                  L Offline
                  L Offline
                  Lightshadown
                  wrote on last edited by
                  #15

                  @JKSH

                  1. done no reference to qt or msys on the PATH
                  2. deleted as well
                  3. not sure how to do that, im using Netbeans and its not so clear as how to do that, i can use VS code but im unable to link the libraries not sure how,
                  4. i just did that but it keeps saying its not suported, plz check the images below

                  Captura.PNG

                  also i did try this

                  Captura2.PNG

                  not sure what to do, im tempeted to leave it in Qt 5.11, the alternative its redo ALL THE CODE from scratch and thats a big no.
                  Any help is welcome

                  JKSHJ 1 Reply Last reply
                  0
                  • L Lightshadown

                    @JKSH

                    1. done no reference to qt or msys on the PATH
                    2. deleted as well
                    3. not sure how to do that, im using Netbeans and its not so clear as how to do that, i can use VS code but im unable to link the libraries not sure how,
                    4. i just did that but it keeps saying its not suported, plz check the images below

                    Captura.PNG

                    also i did try this

                    Captura2.PNG

                    not sure what to do, im tempeted to leave it in Qt 5.11, the alternative its redo ALL THE CODE from scratch and thats a big no.
                    Any help is welcome

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by JKSH
                    #16

                    @Lightshadown said in migrate from Qt5.11 to 6:

                    i just did that but it keeps saying its not suported

                    So Netbeans doesn't support it. Qt Creator does.

                    OK, try switching back to your MSYS Make with C:\Qt\Tools\mingw810_64\bin\g++.exe (After doing steps #1 and #2 in my previous post)

                    Anyway, Qt 6.1 uses the same version of MinGW as Qt 5.15. What's in your "MinGW64__Qt_6.1.2" settings? Use the same for Qt 5.15.

                    1. not sure how to do that, im using Netbeans and its not so clear as how to do that

                    I've never used Netbeans before so I don't know what it can and can't do, sorry.

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    L 1 Reply Last reply
                    0
                    • JKSHJ JKSH

                      @Lightshadown said in migrate from Qt5.11 to 6:

                      i just did that but it keeps saying its not suported

                      So Netbeans doesn't support it. Qt Creator does.

                      OK, try switching back to your MSYS Make with C:\Qt\Tools\mingw810_64\bin\g++.exe (After doing steps #1 and #2 in my previous post)

                      Anyway, Qt 6.1 uses the same version of MinGW as Qt 5.15. What's in your "MinGW64__Qt_6.1.2" settings? Use the same for Qt 5.15.

                      1. not sure how to do that, im using Netbeans and its not so clear as how to do that

                      I've never used Netbeans before so I don't know what it can and can't do, sorry.

                      L Offline
                      L Offline
                      Lightshadown
                      wrote on last edited by
                      #17

                      @JKSH im gona leave it in Qt 5.11 it seems the problem its netbeans itself for some reason it simply wont compile in a diferente version of Qt, in the Qt MinGW64__Qt_6.1.2" settings theres exacly the same as the 5.15, just the qmake its diferent (qmake for 5.15)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved