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. [SOLVED] How to use "Qt compatibility layer" mode while compiling and building applications build from QT4 in QT5 using "compatibility members"
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to use "Qt compatibility layer" mode while compiling and building applications build from QT4 in QT5 using "compatibility members"

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.2k Views 1 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.
  • S Offline
    S Offline
    sanjaysampat
    wrote on last edited by
    #1

    I have QT creator 2.6.1 installed. I have configured 'kit' both for QT 4.8.2 and QT 5.0.0. I am able to build both QT4 and QT5 projects from QT Creator 2.6.1. I am able to build an old project of 4.8.2 in QT 5 successfully.

    I have a project, already built in QT 4.8.2 and running. I have created a copy of the project in different folder. I am trying to build the copied project in QT 5. The current project is using some of the methods which are marked as "compatibility members" in QT 5 classes. As this project is older project. Will it be possible for me to build this project where "compatibility members" are used?

    If 'Yes", what settings I have to do in my project (.pro) file or my CPP or H files to ON "Qt compatibility layer" while building?

    Regards

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      If you are talking about Qt3 compatibility: it has been removed in Qt5.

      If you are talking about Qt4 compatibility: use QT_DISABLE_DEPRECATED_BEFORE to define the acceptable API version.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sanjaysampat
        wrote on last edited by
        #3

        Thank you Lukas for the help.

        As mentioned above, QT3 compatible members will not be working in QT5.

        We should try to modify the usage of deprecated members as much as possible. If in case there is no choice left then only we can use the define in project (.pro) file (first statement possible) as

        @DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000@

        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