Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Convert a Project from Qt3 to Qt5

Convert a Project from Qt3 to Qt5

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 4 Posters 5.1k Views
  • 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.
  • M Offline
    M Offline
    Monsif
    wrote on 2 Feb 2017, 15:31 last edited by A Former User 2 Aug 2017, 19:43
    #1

    Hi,
    I'm already making some small project in Qt3 and Qt5 with C++ , but my objective is to convert a big Project from Qt3 to Qt5 . It is possible ? what is the best way to do it ? step by step .

    Thk you for your Help .

    K 1 Reply Last reply 2 Feb 2017, 16:02
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 2 Feb 2017, 15:59 last edited by mrjj 2 Feb 2017, 16:02
      #2

      Hi and welcome

      Yes its possible but lots and lots of changes. Qt3 is epic old.

      from 3->4
      http://doc.qt.io/qt-4.8/porting4.html
      4->5
      https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

      But some of the classes might be gone and some method may no longer work so be
      prepared to re-write some of it instead of porting.

      It will most like take a long time if big project
      and will be more difficult if you are new to Qt.

      M 1 Reply Last reply 8 Feb 2017, 10:34
      3
      • M Monsif
        2 Feb 2017, 15:31

        Hi,
        I'm already making some small project in Qt3 and Qt5 with C++ , but my objective is to convert a big Project from Qt3 to Qt5 . It is possible ? what is the best way to do it ? step by step .

        Thk you for your Help .

        K Offline
        K Offline
        koahnig
        wrote on 2 Feb 2017, 16:02 last edited by
        #3

        @Monsif

        Hi and welcome to devnet

        Here is some information for converting from Qt3 to Qt4
        The next step would be the conversion frm Qt4 to Qt5, which I know is actually a minor step.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        3
        • M mrjj
          2 Feb 2017, 15:59

          Hi and welcome

          Yes its possible but lots and lots of changes. Qt3 is epic old.

          from 3->4
          http://doc.qt.io/qt-4.8/porting4.html
          4->5
          https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5

          But some of the classes might be gone and some method may no longer work so be
          prepared to re-write some of it instead of porting.

          It will most like take a long time if big project
          and will be more difficult if you are new to Qt.

          M Offline
          M Offline
          Monsif
          wrote on 8 Feb 2017, 10:34 last edited by
          #4

          @mrjj Hi ,
          thanks for your Help , I don't know really how to start .there is some Tolls there are ready to use ?
          what do you advice me to do first ?

          M 1 Reply Last reply 8 Feb 2017, 11:27
          0
          • M Monsif
            8 Feb 2017, 10:34

            @mrjj Hi ,
            thanks for your Help , I don't know really how to start .there is some Tolls there are ready to use ?
            what do you advice me to do first ?

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 8 Feb 2017, 11:27 last edited by
            #5

            @Monsif
            Hi
            Its really hard to advice on as normally one would look over the source.

            The best way depends on how cleanly the GUI is separated from
            the data and if the app is made of well-defined modules or just a gigantic mess.

            Also depends on what the app need.
            It might use stuff from Qt3 that do not exist anymore etc.

            Also if code is from when qt3 was new, then a new compiler might get billion warning etc.
            Much have changed.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 8 Feb 2017, 21:31 last edited by
              #6

              Hi,

              I'd recommend starting by the port to Qt 4 by completely forgetting that there's a compatibility module. This one was only there to help transition but it's not available in Qt 5 so there's no reasons to try to use it.

              Then just try building the your project with Qt 4. If there are classes missing, check the porting guide to see with what to replace them.

              If your big project contains several sub-projects, then just build them one after the other so you'll have less stuff to handle at once.

              Once thing you can do while going through your sources is to remove the modules from the includes e.g. from #include <QtGui/QWidget> to #include <QWidget> that will save you some time for the Qt 4 to Qt 5 transition.

              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
              1

              1/6

              2 Feb 2017, 15:31

              • Login

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