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. Qt5Compat not installed
Forum Updated to NodeBB v4.3 + New Features

Qt5Compat not installed

Scheduled Pinned Locked Moved Solved General and Desktop
qtquickqt5compat
6 Posts 3 Posters 8.4k 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.
  • C Offline
    C Offline
    chairman
    wrote on 18 Mar 2021, 18:35 last edited by chairman
    #1

    I want to use QtGraphicalEffects in qt6 by ```
    import Qt5Compat.QtGraphicalEffects

    Am getting Qt5Compat not installed error.
    
    From installation folder  Qt5Compat is already installed.
    1 Reply Last reply
    0
    • N Offline
      N Offline
      nagesh
      wrote on 19 Mar 2021, 01:01 last edited by
      #3

      @chairman
      As per Qt Docs import statement

      import Qt5Compat.GraphicalEffects
      

      https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html

      in order to link against the module in cmake

      find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
      target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
      https://doc.qt.io/qt-6/qtcore5-index.html

      C 1 Reply Last reply 19 Mar 2021, 04:44
      3
      • C Offline
        C Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on 18 Mar 2021, 18:36 last edited by
        #2

        Pleas re-read your post and ask yourself if someone without your own knowledge can really understand what your problem is.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nagesh
          wrote on 19 Mar 2021, 01:01 last edited by
          #3

          @chairman
          As per Qt Docs import statement

          import Qt5Compat.GraphicalEffects
          

          https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html

          in order to link against the module in cmake

          find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
          target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
          https://doc.qt.io/qt-6/qtcore5-index.html

          C 1 Reply Last reply 19 Mar 2021, 04:44
          3
          • N nagesh
            19 Mar 2021, 01:01

            @chairman
            As per Qt Docs import statement

            import Qt5Compat.GraphicalEffects
            

            https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html

            in order to link against the module in cmake

            find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
            target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
            https://doc.qt.io/qt-6/qtcore5-index.html

            C Offline
            C Offline
            chairman
            wrote on 19 Mar 2021, 04:44 last edited by
            #4

            @nagesh it seems like this is supposed to be added in C++ main file but am using qt for python. Correct me if am wrong. If so where specific am I supposed to add this. Thank you.

            N 1 Reply Last reply 19 Mar 2021, 06:47
            0
            • C chairman
              19 Mar 2021, 04:44

              @nagesh it seems like this is supposed to be added in C++ main file but am using qt for python. Correct me if am wrong. If so where specific am I supposed to add this. Thank you.

              N Offline
              N Offline
              nagesh
              wrote on 19 Mar 2021, 06:47 last edited by
              #5

              @chairman I feel import statement is part of qml file
              import Qt5Compat.GraphicalEffects

              And CMakeLists.txt
              find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
              target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)

              Not sure about qt for python

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chairman
                wrote on 19 Mar 2021, 08:14 last edited by
                #6

                Thanks, it worked with C++ by adding below line
                in project.pro, unfortunately python project don't create this file.
                But incase anyone else has a python workaround please share.

                QT += core5compat
                1 Reply Last reply
                0

                5/6

                19 Mar 2021, 06:47

                • Login

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