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
Qt 6.11 is out! See what's new in the release blog

Qt5Compat not installed

Scheduled Pinned Locked Moved Solved General and Desktop
qtquickqt5compat
6 Posts 3 Posters 10.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.
  • C Offline
    C Offline
    chairman
    wrote on 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
    • nageshN Offline
      nageshN Offline
      nagesh
      wrote on 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
      3
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on 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
        • nageshN Offline
          nageshN Offline
          nagesh
          wrote on 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
          3
          • nageshN nagesh

            @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 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.

            nageshN 1 Reply Last reply
            0
            • C chairman

              @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.

              nageshN Offline
              nageshN Offline
              nagesh
              wrote on 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 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

                • Login

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